date = list(map(int,input().split())) assert len(date) == 6 b = 0 for i in range(0,5,2): b += date[i] ** date[i + 1] if b % 2 == 0: print(":-)") else: print(":-(")