n = int(input()) l = [x%6+1 for x in list(range(n))] print(["No","Yes"][0 if n<6 else len(l)%len(set(l))==0])