Scanf.scanf "%d" (fun n ->
    let a = Array.make (n + 1) false in
    let rec loop i =
        let rec loop2 j =
            if j <= n then (a.(j) <- true; loop2 (j + 7))
        in
        if i <= n then (loop2 i; loop (i + 4))
    in
    loop 0;
    print_endline @@ if a.(n) then "Yes" else "No"
)