print("YES" if int(input())%8 in {1,7} else "NO")