I = int(input()) if I % 45 == 0: print("Yes") else: print("No")