n,m=map(int,input().split()) for i in range(n): x1,y1,x2,y2=map(int,input().split()) for i in range(m): a,b,c,d=map(int,input().split())