k = int(input())
if k % 3 == 0 or k % 5 == 0 or k % 3 == 2 or k % 5 == 3:
print('YES')
elif k >= 6 and (k - 6) % 5 == 0:
print('YES')
elif k >= 9 and (k - 9) % 5 == 0:
print('YES')
elif k >= 12 and (k - 12) % 5 == 0:
print('YES')
elif k <= 4:
print('NO')
else:
print('NO')
https://ideone.com/gSY6ii