print("No" if int(input())%90 else "Yes")