a,b,c,d,e,f=map(int,input().split()) print(":-)" if (pow(a,b)+pow(c,d)+pow(e,f))%2==0 else ":-(")