import java.util.Scanner;

class Main{
  static int words[] = new int[3];

  /** カウント */
  private static int COUNT_5, COUNT_7;

  /**
   * メインメソッド
   *
   * @param args 引数
   */
  public static void main(String[] args) {
    setData();
    calc();

    System.out.println(COUNT_5 == 2 && COUNT_7 == 1 ? "YES" : "NO");
  }

  /** 初期値設定 */
  private static void setData() {
    Scanner sc = new Scanner(System.in);
    words[0] = sc.nextInt();
    words[1] = sc.nextInt();
    words[2] = sc.nextInt();
  }

  /** 計算メソッド */
  private static void calc() {
    for (int word : words) {
      if (word == 5) {
        COUNT_5++;
      } else if (word == 7) {
        COUNT_7++;
      }
    }
  }
} import java.util.Scanner; Scanner java.util class Main{
  static int words[] = new int[3];

  /** カウント */
  private static int COUNT_5, COUNT_7;

  /**
   * メインメソッド
   *
   * @param args 引数
   */
  public static void main(String[] args) {
    setData();
    calc();

    System.out.println(COUNT_5 == 2 && COUNT_7 == 1 ? "YES" : "NO");
  }

  /** 初期値設定 */
  private static void setData() {
    Scanner sc = new Scanner(System.in);
    words[0] = sc.nextInt();
    words[1] = sc.nextInt();
    words[2] = sc.nextInt();
  }

  /** 計算メソッド */
  private static void calc() {
    for (int word : words) {
      if (word == 5) {
        COUNT_5++;
      } else if (word == 7) {
        COUNT_7++;
      }
    }
  }
} Main static int words[] = new int[3]; words new int[3] 3 /** カウント */
  private static int COUNT_5 COUNT_5 COUNT_7; COUNT_7 /**
   * メインメソッド
   *
   * @param args 引数
   */
  public static void main(String[] args) {
    setData();
    calc();

    System.out.println(COUNT_5 == 2 && COUNT_7 == 1 ? "YES" : "NO");
  } main {
    setData();
    calc();

    System.out.println(COUNT_5 == 2 && COUNT_7 == 1 ? "YES" : "NO");
  } setData() setData calc() calc System.out.println(COUNT_5 == 2 && COUNT_7 == 1 ? "YES" : "NO") System.out.println System.out System System.out COUNT_5 == 2 && COUNT_7 == 1 ? "YES" : "NO" COUNT_5 == 2 && COUNT_7 == 1 COUNT_5 == 2 COUNT_5 2 COUNT_7 == 1 COUNT_7 1 "YES" "NO" String[] args args /** 初期値設定 */
  private static void setData() {
    Scanner sc = new Scanner(System.in);
    words[0] = sc.nextInt();
    words[1] = sc.nextInt();
    words[2] = sc.nextInt();
  } setData {
    Scanner sc = new Scanner(System.in);
    words[0] = sc.nextInt();
    words[1] = sc.nextInt();
    words[2] = sc.nextInt();
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) words[0] = sc.nextInt() words[0] words 0 sc.nextInt() sc.nextInt sc words[1] = sc.nextInt() words[1] words 1 sc.nextInt() sc.nextInt sc words[2] = sc.nextInt() words[2] words 2 sc.nextInt() sc.nextInt sc /** 計算メソッド */
  private static void calc() {
    for (int word : words) {
      if (word == 5) {
        COUNT_5++;
      } else if (word == 7) {
        COUNT_7++;
      }
    }
  } calc {
    for (int word : words) {
      if (word == 5) {
        COUNT_5++;
      } else if (word == 7) {
        COUNT_7++;
      }
    }
  } for (int word : words) {
      if (word == 5) {
        COUNT_5++;
      } else if (word == 7) {
        COUNT_7++;
      }
    } int word words {
      if (word == 5) {
        COUNT_5++;
      } else if (word == 7) {
        COUNT_7++;
      }
    } {
      if (word == 5) {
        COUNT_5++;
      } else if (word == 7) {
        COUNT_7++;
      }
    } if (word == 5) {
        COUNT_5++;
      } else if (word == 7) {
        COUNT_7++;
      } word == 5 word 5 {
        COUNT_5++;
      } COUNT_5++ COUNT_5 if (word == 7) {
        COUNT_7++;
      } word == 7 word 7 {
        COUNT_7++;
      } COUNT_7++ COUNT_7
import java.util.Scanner;

class Main{
  static int words[] = new int[3];

  /** カウント */
  private static int COUNT_5, COUNT_7;

  /**
   * メインメソッド
   *
   * @param args 引数
   */
  public static void main(String[] args) {
    setData();
    calc();

    System.out.println(COUNT_5 == 2 && COUNT_7 == 1 ? "YES" : "NO");
  }

  /** 初期値設定 */
  private static void setData() {
    Scanner sc = new Scanner(System.in);
    words[0] = sc.nextInt();
    words[1] = sc.nextInt();
    words[2] = sc.nextInt();
  }

  /** 計算メソッド */
  private static void calc() {
    for (int word : words) {
      if (word == 5) {
        COUNT_5++;
      } else if (word == 7) {
        COUNT_7++;
      }
    }
  }
}