n = gets.to_i p n == (1..n).map {|i| i % 6 + 1 }.uniq.length ? "Yes" : "No"