import java.util.*;

class Main{
	public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int five=0,seven=0;
    for(int i=0;i<3;i++){
    int n = Integer.parseInt(sc.next());
    if(n==5)five++;
    else if(n==7)seven++;
  }
  if(five==2 && seven==1)System.out.println("YES");
  else System.out.println("NO");
}
} import java.util.*; util.* java class Main{
	public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int five=0,seven=0;
    for(int i=0;i<3;i++){
    int n = Integer.parseInt(sc.next());
    if(n==5)five++;
    else if(n==7)seven++;
  }
  if(five==2 && seven==1)System.out.println("YES");
  else System.out.println("NO");
}
} Main public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int five=0,seven=0;
    for(int i=0;i<3;i++){
    int n = Integer.parseInt(sc.next());
    if(n==5)five++;
    else if(n==7)seven++;
  }
  if(five==2 && seven==1)System.out.println("YES");
  else System.out.println("NO");
} main {
    Scanner sc = new Scanner(System.in);
    int five=0,seven=0;
    for(int i=0;i<3;i++){
    int n = Integer.parseInt(sc.next());
    if(n==5)five++;
    else if(n==7)seven++;
  }
  if(five==2 && seven==1)System.out.println("YES");
  else System.out.println("NO");
} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int five=0 five 0 seven=0; seven 0 for(int i=0;i<3;i++){
    int n = Integer.parseInt(sc.next());
    if(n==5)five++;
    else if(n==7)seven++;
  } int i=0; int i=0; i 0 i<3 i 3 i++ i++ i {
    int n = Integer.parseInt(sc.next());
    if(n==5)five++;
    else if(n==7)seven++;
  } {
    int n = Integer.parseInt(sc.next());
    if(n==5)five++;
    else if(n==7)seven++;
  } int n = Integer.parseInt(sc.next()); n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc if(n==5)five++;
    else if(n==7)seven++; n==5 n 5 five++ five if(n==7)seven++; n==7 n 7 seven++ seven if(five==2 && seven==1)System.out.println("YES");
  else System.out.println("NO"); five==2 && seven==1 five==2 five 2 seven==1 seven 1 System.out.println("YES") System.out.println System.out System System.out "YES" System.out.println("NO") System.out.println System.out System System.out "NO" String args[] args
import java.util.*;

class Main{
	public static void main(String args[]){
    Scanner sc = new Scanner(System.in);
    int five=0,seven=0;
    for(int i=0;i<3;i++){
    int n = Integer.parseInt(sc.next());
    if(n==5)five++;
    else if(n==7)seven++;
  }
  if(five==2 && seven==1)System.out.println("YES");
  else System.out.println("NO");
}
}
