import java.util.*;

public class Main {
  public static void main(String[] args){
    
    int five_count = 0;
    int seven_count = 0;
    int a = -1;
    
    Scanner sc = new Scanner(System.in);
    
    for(int i = 0; i<3; i++){
      a = sc.nextInt();
      if(a == 5){
        five_count++;
      }else if(a == 7){
        seven_count++;
      }else{
        System.out.println("NO");
        break;
      }
    }
    
    if(five_count == 2 && seven_count == 1){
      System.out.println("YES");
    }else{
      System.out.println("NO");
    }
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args){
    
    int five_count = 0;
    int seven_count = 0;
    int a = -1;
    
    Scanner sc = new Scanner(System.in);
    
    for(int i = 0; i<3; i++){
      a = sc.nextInt();
      if(a == 5){
        five_count++;
      }else if(a == 7){
        seven_count++;
      }else{
        System.out.println("NO");
        break;
      }
    }
    
    if(five_count == 2 && seven_count == 1){
      System.out.println("YES");
    }else{
      System.out.println("NO");
    }
  }
} Main public static void main(String[] args){
    
    int five_count = 0;
    int seven_count = 0;
    int a = -1;
    
    Scanner sc = new Scanner(System.in);
    
    for(int i = 0; i<3; i++){
      a = sc.nextInt();
      if(a == 5){
        five_count++;
      }else if(a == 7){
        seven_count++;
      }else{
        System.out.println("NO");
        break;
      }
    }
    
    if(five_count == 2 && seven_count == 1){
      System.out.println("YES");
    }else{
      System.out.println("NO");
    }
  } main {
    
    int five_count = 0;
    int seven_count = 0;
    int a = -1;
    
    Scanner sc = new Scanner(System.in);
    
    for(int i = 0; i<3; i++){
      a = sc.nextInt();
      if(a == 5){
        five_count++;
      }else if(a == 7){
        seven_count++;
      }else{
        System.out.println("NO");
        break;
      }
    }
    
    if(five_count == 2 && seven_count == 1){
      System.out.println("YES");
    }else{
      System.out.println("NO");
    }
  } int five_count = 0; five_count 0 int seven_count = 0; seven_count 0 int a = -1; a -1 1 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) for(int i = 0; i<3; i++){
      a = sc.nextInt();
      if(a == 5){
        five_count++;
      }else if(a == 7){
        seven_count++;
      }else{
        System.out.println("NO");
        break;
      }
    } int i = 0; int i = 0; i 0 i<3 i 3 i++ i++ i {
      a = sc.nextInt();
      if(a == 5){
        five_count++;
      }else if(a == 7){
        seven_count++;
      }else{
        System.out.println("NO");
        break;
      }
    } {
      a = sc.nextInt();
      if(a == 5){
        five_count++;
      }else if(a == 7){
        seven_count++;
      }else{
        System.out.println("NO");
        break;
      }
    } a = sc.nextInt() a sc.nextInt() sc.nextInt sc if(a == 5){
        five_count++;
      }else if(a == 7){
        seven_count++;
      }else{
        System.out.println("NO");
        break;
      } a == 5 a 5 {
        five_count++;
      } five_count++ five_count if(a == 7){
        seven_count++;
      }else{
        System.out.println("NO");
        break;
      } a == 7 a 7 {
        seven_count++;
      } seven_count++ seven_count {
        System.out.println("NO");
        break;
      } System.out.println("NO") System.out.println System.out System System.out "NO" break; if(five_count == 2 && seven_count == 1){
      System.out.println("YES");
    }else{
      System.out.println("NO");
    } five_count == 2 && seven_count == 1 five_count == 2 five_count 2 seven_count == 1 seven_count 1 {
      System.out.println("YES");
    } System.out.println("YES") System.out.println System.out System System.out "YES" {
      System.out.println("NO");
    } System.out.println("NO") System.out.println System.out System System.out "NO" String[] args args public class Main {
  public static void main(String[] args){
    
    int five_count = 0;
    int seven_count = 0;
    int a = -1;
    
    Scanner sc = new Scanner(System.in);
    
    for(int i = 0; i<3; i++){
      a = sc.nextInt();
      if(a == 5){
        five_count++;
      }else if(a == 7){
        seven_count++;
      }else{
        System.out.println("NO");
        break;
      }
    }
    
    if(five_count == 2 && seven_count == 1){
      System.out.println("YES");
    }else{
      System.out.println("NO");
    }
  }
} public class Main {
  public static void main(String[] args){
    
    int five_count = 0;
    int seven_count = 0;
    int a = -1;
    
    Scanner sc = new Scanner(System.in);
    
    for(int i = 0; i<3; i++){
      a = sc.nextInt();
      if(a == 5){
        five_count++;
      }else if(a == 7){
        seven_count++;
      }else{
        System.out.println("NO");
        break;
      }
    }
    
    if(five_count == 2 && seven_count == 1){
      System.out.println("YES");
    }else{
      System.out.println("NO");
    }
  }
} Main
import java.util.*;

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