import java.util.*;

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

public class Main {
	public static void main(String[] args) {
		Scanner scn = new Scanner(System.in);
		int cont1 = 0, cont2 = 0;
		int n1 = scn.nextInt();
		if(n1==5)cont1++;
		else if(n1==7)cont2++;
		 n1 = scn.nextInt();
		if(n1==5)cont1++;
		else if(n1==7)cont2++;
		n1 = scn.nextInt();
		if(n1==5)cont1++;
		else if(n1==7)cont2++;
		if(cont1==2&cont2==1)System.out.println("YES");
		else System.out.println("NO");
		scn.close();
	}
}