import std.stdio;
import std.string;
import std.conv;
import std.array;
import std.algorithm;

immutable MAX_SCORE = 20;
immutable MAX_CARDS = 10;



void main() {
    string[] input;

    while ((input = readln.chomp.split(" ")).length != 0) {
        auto cards = new bool[](10); //未出現カード
        auto openedCards = input.map!(to!int); //0,1:自分の手札, 2:相手の公開札
        auto deck = MAX_CARDS - (openedCards.length + 1); //山札の残り枚数
        auto myScore = openedCards[0] + openedCards[1]; //現在の手札の合計
        auto count = 0;

        cards.fill(true);
        foreach (i; openedCards) {
            cards[i - 1] = false;
        }
        foreach (i; 0..(MAX_SCORE - myScore)) {
            if (i >= 10) break;
            if (cards[i]) count++;
        }

        if ((count / deck) >= 0.50) {
            writeln("YES");
        } else {
            writeln("NO");
        }
    }
}