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