from functools import lru_cache
sys.setrecursionlimit(2000)

n

@lru_cache(maxsize=2000)
def dfs(k):
    if k<0:return False
    if k==0:return True if n&1 else False
    return not(dfs(k-1) and dfs(k-2) and dfs(k-3))

def main():
    n=int(input())
    print('Yes' if not dfs(k) else 'No')