import java.util.*;

public class Main{
	static Scanner s=new Scanner(System.in);
	public static void main(String [] args){
		int a,b,c;
		a=s.nextInt();
		b=s.nextInt();
		c=s.nextInt();
		int fiv=0,sev=0;
		if(a==5)fiv++;
		if(a==7)sev++;
		if(b==5)fiv++;
		if(b==7)sev++;
		if(c==5)fiv++;
		if(c==7)sev++;
		if(fiv==2&&sev==1)System.out.println("YES");
		else System.out.println("NO");
	}
} import java.util.*; util.* java public class Main{
	static Scanner s=new Scanner(System.in);
	public static void main(String [] args){
		int a,b,c;
		a=s.nextInt();
		b=s.nextInt();
		c=s.nextInt();
		int fiv=0,sev=0;
		if(a==5)fiv++;
		if(a==7)sev++;
		if(b==5)fiv++;
		if(b==7)sev++;
		if(c==5)fiv++;
		if(c==7)sev++;
		if(fiv==2&&sev==1)System.out.println("YES");
		else System.out.println("NO");
	}
} Main static Scanner s=new Scanner(System.in); s new Scanner(System.in) public static void main(String [] args){
		int a,b,c;
		a=s.nextInt();
		b=s.nextInt();
		c=s.nextInt();
		int fiv=0,sev=0;
		if(a==5)fiv++;
		if(a==7)sev++;
		if(b==5)fiv++;
		if(b==7)sev++;
		if(c==5)fiv++;
		if(c==7)sev++;
		if(fiv==2&&sev==1)System.out.println("YES");
		else System.out.println("NO");
	} main {
		int a,b,c;
		a=s.nextInt();
		b=s.nextInt();
		c=s.nextInt();
		int fiv=0,sev=0;
		if(a==5)fiv++;
		if(a==7)sev++;
		if(b==5)fiv++;
		if(b==7)sev++;
		if(c==5)fiv++;
		if(c==7)sev++;
		if(fiv==2&&sev==1)System.out.println("YES");
		else System.out.println("NO");
	} int a a b b c; c a=s.nextInt() a s.nextInt() s.nextInt s b=s.nextInt() b s.nextInt() s.nextInt s c=s.nextInt() c s.nextInt() s.nextInt s int fiv=0 fiv 0 sev=0; sev 0 if(a==5)fiv++; a==5 a 5 fiv++ fiv if(a==7)sev++; a==7 a 7 sev++ sev if(b==5)fiv++; b==5 b 5 fiv++ fiv if(b==7)sev++; b==7 b 7 sev++ sev if(c==5)fiv++; c==5 c 5 fiv++ fiv if(c==7)sev++; c==7 c 7 sev++ sev if(fiv==2&&sev==1)System.out.println("YES");
		else System.out.println("NO"); fiv==2&&sev==1 fiv==2 fiv 2 sev==1 sev 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 public class Main{
	static Scanner s=new Scanner(System.in);
	public static void main(String [] args){
		int a,b,c;
		a=s.nextInt();
		b=s.nextInt();
		c=s.nextInt();
		int fiv=0,sev=0;
		if(a==5)fiv++;
		if(a==7)sev++;
		if(b==5)fiv++;
		if(b==7)sev++;
		if(c==5)fiv++;
		if(c==7)sev++;
		if(fiv==2&&sev==1)System.out.println("YES");
		else System.out.println("NO");
	}
} public class Main{
	static Scanner s=new Scanner(System.in);
	public static void main(String [] args){
		int a,b,c;
		a=s.nextInt();
		b=s.nextInt();
		c=s.nextInt();
		int fiv=0,sev=0;
		if(a==5)fiv++;
		if(a==7)sev++;
		if(b==5)fiv++;
		if(b==7)sev++;
		if(c==5)fiv++;
		if(c==7)sev++;
		if(fiv==2&&sev==1)System.out.println("YES");
		else System.out.println("NO");
	}
} Main
import java.util.*;

public class Main{
	static Scanner s=new Scanner(System.in);
	public static void main(String [] args){
		int a,b,c;
		a=s.nextInt();
		b=s.nextInt();
		c=s.nextInt();
		int fiv=0,sev=0;
		if(a==5)fiv++;
		if(a==7)sev++;
		if(b==5)fiv++;
		if(b==7)sev++;
		if(c==5)fiv++;
		if(c==7)sev++;
		if(fiv==2&&sev==1)System.out.println("YES");
		else System.out.println("NO");
	}
}