import java.util.*;

class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);

    String str = sc.nextLine();

    String[] strArray = str.split(" ");

    int cntFive = 0;
    int cntSeven = 0;
	
    for (int i = 0; i < strArray.length; i++){
      if(!strArray[i].equals("5") && !strArray[i].equals("7")){
        System.out.print("NO");
        return;
      }else{
        if(strArray[i].equals("5")){
          cntFive++;
        }else{
          cntSeven++;
        }
      }
    }
    if(cntFive != 2 || cntSeven != 1){
        System.out.print("NO");
    }else{
        System.out.print("YES");
    }
  }
} import java.util.*; util.* java class Main{
  public static void main(String args[]){
    Scanner sc = new Scanner(System.in);

    String str = sc.nextLine();

    String[] strArray = str.split(" ");

    int cntFive = 0;
    int cntSeven = 0;
	
    for (int i = 0; i < strArray.length; i++){
      if(!strArray[i].equals("5") && !strArray[i].equals("7")){
        System.out.print("NO");
        return;
      }else{
        if(strArray[i].equals("5")){
          cntFive++;
        }else{
          cntSeven++;
        }
      }
    }
    if(cntFive != 2 || cntSeven != 1){
        System.out.print("NO");
    }else{
        System.out.print("YES");
    }
  }
} Main public static void main(String args[]){
    Scanner sc = new Scanner(System.in);

    String str = sc.nextLine();

    String[] strArray = str.split(" ");

    int cntFive = 0;
    int cntSeven = 0;
	
    for (int i = 0; i < strArray.length; i++){
      if(!strArray[i].equals("5") && !strArray[i].equals("7")){
        System.out.print("NO");
        return;
      }else{
        if(strArray[i].equals("5")){
          cntFive++;
        }else{
          cntSeven++;
        }
      }
    }
    if(cntFive != 2 || cntSeven != 1){
        System.out.print("NO");
    }else{
        System.out.print("YES");
    }
  } main {
    Scanner sc = new Scanner(System.in);

    String str = sc.nextLine();

    String[] strArray = str.split(" ");

    int cntFive = 0;
    int cntSeven = 0;
	
    for (int i = 0; i < strArray.length; i++){
      if(!strArray[i].equals("5") && !strArray[i].equals("7")){
        System.out.print("NO");
        return;
      }else{
        if(strArray[i].equals("5")){
          cntFive++;
        }else{
          cntSeven++;
        }
      }
    }
    if(cntFive != 2 || cntSeven != 1){
        System.out.print("NO");
    }else{
        System.out.print("YES");
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.nextLine(); str sc.nextLine() sc.nextLine sc String[] strArray = str.split(" "); strArray str.split(" ") str.split str " " int cntFive = 0; cntFive 0 int cntSeven = 0; cntSeven 0 for (int i = 0; i < strArray.length; i++){
      if(!strArray[i].equals("5") && !strArray[i].equals("7")){
        System.out.print("NO");
        return;
      }else{
        if(strArray[i].equals("5")){
          cntFive++;
        }else{
          cntSeven++;
        }
      }
    } int i = 0; int i = 0; i 0 i < strArray.length i strArray.length strArray strArray.length i++ i++ i {
      if(!strArray[i].equals("5") && !strArray[i].equals("7")){
        System.out.print("NO");
        return;
      }else{
        if(strArray[i].equals("5")){
          cntFive++;
        }else{
          cntSeven++;
        }
      }
    } {
      if(!strArray[i].equals("5") && !strArray[i].equals("7")){
        System.out.print("NO");
        return;
      }else{
        if(strArray[i].equals("5")){
          cntFive++;
        }else{
          cntSeven++;
        }
      }
    } if(!strArray[i].equals("5") && !strArray[i].equals("7")){
        System.out.print("NO");
        return;
      }else{
        if(strArray[i].equals("5")){
          cntFive++;
        }else{
          cntSeven++;
        }
      } !strArray[i].equals("5") && !strArray[i].equals("7") !strArray[i].equals("5") strArray[i].equals("5") strArray[i].equals strArray[i] strArray i "5" !strArray[i].equals("7") strArray[i].equals("7") strArray[i].equals strArray[i] strArray i "7" {
        System.out.print("NO");
        return;
      } System.out.print("NO") System.out.print System.out System System.out "NO" return; {
        if(strArray[i].equals("5")){
          cntFive++;
        }else{
          cntSeven++;
        }
      } if(strArray[i].equals("5")){
          cntFive++;
        }else{
          cntSeven++;
        } strArray[i].equals("5") strArray[i].equals strArray[i] strArray i "5" {
          cntFive++;
        } cntFive++ cntFive {
          cntSeven++;
        } cntSeven++ cntSeven if(cntFive != 2 || cntSeven != 1){
        System.out.print("NO");
    }else{
        System.out.print("YES");
    } cntFive != 2 || cntSeven != 1 cntFive != 2 cntFive 2 cntSeven != 1 cntSeven 1 {
        System.out.print("NO");
    } System.out.print("NO") System.out.print System.out System System.out "NO" {
        System.out.print("YES");
    } System.out.print("YES") System.out.print 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);

    String str = sc.nextLine();

    String[] strArray = str.split(" ");

    int cntFive = 0;
    int cntSeven = 0;
	
    for (int i = 0; i < strArray.length; i++){
      if(!strArray[i].equals("5") && !strArray[i].equals("7")){
        System.out.print("NO");
        return;
      }else{
        if(strArray[i].equals("5")){
          cntFive++;
        }else{
          cntSeven++;
        }
      }
    }
    if(cntFive != 2 || cntSeven != 1){
        System.out.print("NO");
    }else{
        System.out.print("YES");
    }
  }
}