h, l, k, z, n = map(int,input().split()) heng = {} zong = {} for _ in range(n): x1, y1, x2, y2 = map(int, input().split()) if x1 == x2 and abs(y1 - y2) == 1: she = min(y1,y2) zong[she] = zong.get(she,0) + 1 if y1 == y2 and abs(x1 - x2) == 1: she = min(x1,x2) heng[she] = heng.get(she,0) + 1 heng = so...