a=list(map(int,input().split())) A=a[::2] B=a[1::2] summary=0 for i in range(3): summary+=A[i]**B[i] if summary%2==0: print(':-)') else: print(':-(')