def prime_factorize(n): a = [] while n % 2 == 0: a.append(2) n //= 2 f = 3 while f * f <= n: if n % f == 0: a.append(f) n //= f else: f += 2 if n != 1: a.append(n) return a a=list(map(int,input().split()))[::2] b=[prime_factorize(a[i]) for i in range(3)] c=set() for i in range(len(b)): for j in range(len(b[i])): c.add(b[i][j]) for i in set(c): if i%2!=0: print(":-(") break else: print(":-)")