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