a,_,b,*c=eval(input());print((-(len(c)>0)or int(a)*int(b)))
a,_,b,*c=eval(input());print((-(c>[])or int(a)*int(b)))
a, _, b, *c = eval(input())
print((-(len(c) > 0) or int(a) * int(b)))

a, _, b, *c = eval(input())
print((-(c > []) or int(a) * int(b)))

-print((-(len(c) > 0) or int(a) * int(b))) +print((-(c > []) or int(a) * int(b)))