while True: try: m,n = map(int,input().split()) #整数 x1,y1,x2,y2 = map(int,input().split()) #坐标 x,y = int(input()),int(input()) #坐标 X,Y = map(int,input().split()) #坐标 print(0 if 0<m<=9 and 0<n<=9 else -1) #(0,9] print(0 if 0<=x1<m ...