a=list(map(int,input().split())) def pow_k(x, n): """ O(log n) """ if n == 0: return 1 K = 1 while n > 1: if n % 2 != 0: K *= x x *= x n //= 2 return K * x A=a[::2] B=a[1::2] summary=0 for i in range(3): summary+=pow_k(A[i], B[i]) if summary%2==0: print(':-)') else: print(':-(')