x,y,z=map(int,input().split()) s,t=map(str,input().split()) h,w=map(str,input().split()) t=int(t) w=int(w) if h