let () =
  try
    while true do
      let c1, c2, c3 = Scanf.scanf "%d %d %d\n" (fun a b c -> (a, b, c)) in
      let lst = [1;2;3;4;5;6;7;8;9;10] in
      let sum2 = c1 + c2 in
      let n = 20 - sum2 in
      let lst' = List.filter (fun x -> x <> c1 && x <> c2 && x <> c3 && x <= n) lst in
      Printf.printf "%s\n" (if (List.length lst') >= 4 then "YES" else "NO")
    done
  with
  | End_of_file -> ()
