x=int(input())
if x%3==0 and x>9 and x<100:
print('+')
else:
print('-')
x = int(input())
print("YES" if ((9 < x < 100) and (x % 3 == 0)) else "NO")
x=int(input())
if x%3==0 and x>9 and x<100:
print('+')
else:
print('-')
x = int(input())
print("YES" if ((9 < x < 100) and (x % 3 == 0)) else "NO")