import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
    String[] str = sc.nextLine().split(" ");
    int fiveCount = 0;
    int sevenCount = 0;
    
    for (String val : str) {
      if (val.equals("5")) fiveCount++;
      if (val.equals("7")) sevenCount++;
    }
    
    System.out.println((fiveCount == 2 && sevenCount == 1) ? "YES": "NO");
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
    String[] str = sc.nextLine().split(" ");
    int fiveCount = 0;
    int sevenCount = 0;
    
    for (String val : str) {
      if (val.equals("5")) fiveCount++;
      if (val.equals("7")) sevenCount++;
    }
    
    System.out.println((fiveCount == 2 && sevenCount == 1) ? "YES": "NO");
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
    String[] str = sc.nextLine().split(" ");
    int fiveCount = 0;
    int sevenCount = 0;
    
    for (String val : str) {
      if (val.equals("5")) fiveCount++;
      if (val.equals("7")) sevenCount++;
    }
    
    System.out.println((fiveCount == 2 && sevenCount == 1) ? "YES": "NO");
  } main {
    Scanner sc = new Scanner(System.in);
    
    String[] str = sc.nextLine().split(" ");
    int fiveCount = 0;
    int sevenCount = 0;
    
    for (String val : str) {
      if (val.equals("5")) fiveCount++;
      if (val.equals("7")) sevenCount++;
    }
    
    System.out.println((fiveCount == 2 && sevenCount == 1) ? "YES": "NO");
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] str = sc.nextLine().split(" "); str sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " int fiveCount = 0; fiveCount 0 int sevenCount = 0; sevenCount 0 for (String val : str) {
      if (val.equals("5")) fiveCount++;
      if (val.equals("7")) sevenCount++;
    } String val str {
      if (val.equals("5")) fiveCount++;
      if (val.equals("7")) sevenCount++;
    } {
      if (val.equals("5")) fiveCount++;
      if (val.equals("7")) sevenCount++;
    } if (val.equals("5")) fiveCount++; val.equals("5") val.equals val "5" fiveCount++ fiveCount if (val.equals("7")) sevenCount++; val.equals("7") val.equals val "7" sevenCount++ sevenCount System.out.println((fiveCount == 2 && sevenCount == 1) ? "YES": "NO") System.out.println System.out System System.out (fiveCount == 2 && sevenCount == 1) ? "YES": "NO" (fiveCount == 2 && sevenCount == 1) fiveCount == 2 fiveCount 2 sevenCount == 1 sevenCount 1 "YES" "NO" String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
    String[] str = sc.nextLine().split(" ");
    int fiveCount = 0;
    int sevenCount = 0;
    
    for (String val : str) {
      if (val.equals("5")) fiveCount++;
      if (val.equals("7")) sevenCount++;
    }
    
    System.out.println((fiveCount == 2 && sevenCount == 1) ? "YES": "NO");
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
    String[] str = sc.nextLine().split(" ");
    int fiveCount = 0;
    int sevenCount = 0;
    
    for (String val : str) {
      if (val.equals("5")) fiveCount++;
      if (val.equals("7")) sevenCount++;
    }
    
    System.out.println((fiveCount == 2 && sevenCount == 1) ? "YES": "NO");
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
    String[] str = sc.nextLine().split(" ");
    int fiveCount = 0;
    int sevenCount = 0;
    
    for (String val : str) {
      if (val.equals("5")) fiveCount++;
      if (val.equals("7")) sevenCount++;
    }
    
    System.out.println((fiveCount == 2 && sevenCount == 1) ? "YES": "NO");
  }
}