import java.util.Scanner;

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

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