Types: N: int, A: List[Tuple[int, int, int, int]], M: int, B: List[Tuple[int, int, int, int]], C: List[str]
Ranges: 1 ≤ N ≤ 10^4, 0 ≤ A[i][j] ≤ 10^3 for 0 ≤ j ≤ 3, 1 ≤ M ≤ 10^4, 0 ≤ B[i][j] ≤ 10^3 for 0 ≤ j ≤ 3, C in {'+', '-', '·'}
Addtl Info: None