import java.util.*;

class Main {
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int[] input = new int[3];
    int fiveCount = 0;
    int sevenCount = 0;

    for(int i = 0; i < 3; i++){
      input[i] = sc.nextInt();
      if(input[i] == 5 && fiveCount < 2){
        fiveCount++;
      }else if(input[i] == 7 && sevenCount < 1){
        sevenCount++;
      }else {
        System.out.println("NO");
        return;
      }
    }
    System.out.println("YES");
  }
}

 import java.util.*; util.* java class Main {
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int[] input = new int[3];
    int fiveCount = 0;
    int sevenCount = 0;

    for(int i = 0; i < 3; i++){
      input[i] = sc.nextInt();
      if(input[i] == 5 && fiveCount < 2){
        fiveCount++;
      }else if(input[i] == 7 && sevenCount < 1){
        sevenCount++;
      }else {
        System.out.println("NO");
        return;
      }
    }
    System.out.println("YES");
  }
} Main public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int[] input = new int[3];
    int fiveCount = 0;
    int sevenCount = 0;

    for(int i = 0; i < 3; i++){
      input[i] = sc.nextInt();
      if(input[i] == 5 && fiveCount < 2){
        fiveCount++;
      }else if(input[i] == 7 && sevenCount < 1){
        sevenCount++;
      }else {
        System.out.println("NO");
        return;
      }
    }
    System.out.println("YES");
  } main {
    Scanner sc = new Scanner(System.in);
    int[] input = new int[3];
    int fiveCount = 0;
    int sevenCount = 0;

    for(int i = 0; i < 3; i++){
      input[i] = sc.nextInt();
      if(input[i] == 5 && fiveCount < 2){
        fiveCount++;
      }else if(input[i] == 7 && sevenCount < 1){
        sevenCount++;
      }else {
        System.out.println("NO");
        return;
      }
    }
    System.out.println("YES");
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int[] input = new int[3]; input new int[3] 3 int fiveCount = 0; fiveCount 0 int sevenCount = 0; sevenCount 0 for(int i = 0; i < 3; i++){
      input[i] = sc.nextInt();
      if(input[i] == 5 && fiveCount < 2){
        fiveCount++;
      }else if(input[i] == 7 && sevenCount < 1){
        sevenCount++;
      }else {
        System.out.println("NO");
        return;
      }
    } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
      input[i] = sc.nextInt();
      if(input[i] == 5 && fiveCount < 2){
        fiveCount++;
      }else if(input[i] == 7 && sevenCount < 1){
        sevenCount++;
      }else {
        System.out.println("NO");
        return;
      }
    } {
      input[i] = sc.nextInt();
      if(input[i] == 5 && fiveCount < 2){
        fiveCount++;
      }else if(input[i] == 7 && sevenCount < 1){
        sevenCount++;
      }else {
        System.out.println("NO");
        return;
      }
    } input[i] = sc.nextInt() input[i] input i sc.nextInt() sc.nextInt sc if(input[i] == 5 && fiveCount < 2){
        fiveCount++;
      }else if(input[i] == 7 && sevenCount < 1){
        sevenCount++;
      }else {
        System.out.println("NO");
        return;
      } input[i] == 5 && fiveCount < 2 input[i] == 5 input[i] input i 5 fiveCount < 2 fiveCount 2 {
        fiveCount++;
      } fiveCount++ fiveCount if(input[i] == 7 && sevenCount < 1){
        sevenCount++;
      }else {
        System.out.println("NO");
        return;
      } input[i] == 7 && sevenCount < 1 input[i] == 7 input[i] input i 7 sevenCount < 1 sevenCount 1 {
        sevenCount++;
      } sevenCount++ sevenCount {
        System.out.println("NO");
        return;
      } System.out.println("NO") System.out.println System.out System System.out "NO" return; System.out.println("YES") System.out.println System.out System System.out "YES" String args[] args
import java.util.*;

class Main {
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int[] input = new int[3];
    int fiveCount = 0;
    int sevenCount = 0;

    for(int i = 0; i < 3; i++){
      input[i] = sc.nextInt();
      if(input[i] == 5 && fiveCount < 2){
        fiveCount++;
      }else if(input[i] == 7 && sevenCount < 1){
        sevenCount++;
      }else {
        System.out.println("NO");
        return;
      }
    }
    System.out.println("YES");
  }
}


