I,R=input,range S,N,B,x=R(3),R(2),[0]*6,[0]*4 def J(): return list(map(int,I().split())) def U(): global a s,b,c=x[0]+x[1]+x[2]+x[3],1,0 for j in R(4):b,c=b*(x[j]>=0),c+x[j]*X[j] for j in S:b*=s-x[j]<=B[j+2] if b*(a