import java.util.Scanner;
public class Main{

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int five = 2;
		int seven = 1;
		for(int i = 0;i <3 ;i++) {
			int moji = scan.nextInt();
			if(moji == 5) {
				five -= 1;
			}else if(moji == 7) {
				seven -= 1;
			}
		}
		if(five == 0 && seven == 0) {
			System.out.print("YES");
		}else {
			System.out.println("NO");
		}
		scan.close();

	}

} import java.util.Scanner; Scanner java.util public class Main{

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int five = 2;
		int seven = 1;
		for(int i = 0;i <3 ;i++) {
			int moji = scan.nextInt();
			if(moji == 5) {
				five -= 1;
			}else if(moji == 7) {
				seven -= 1;
			}
		}
		if(five == 0 && seven == 0) {
			System.out.print("YES");
		}else {
			System.out.println("NO");
		}
		scan.close();

	}

} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int five = 2;
		int seven = 1;
		for(int i = 0;i <3 ;i++) {
			int moji = scan.nextInt();
			if(moji == 5) {
				five -= 1;
			}else if(moji == 7) {
				seven -= 1;
			}
		}
		if(five == 0 && seven == 0) {
			System.out.print("YES");
		}else {
			System.out.println("NO");
		}
		scan.close();

	} main {
		Scanner scan = new Scanner(System.in);
		int five = 2;
		int seven = 1;
		for(int i = 0;i <3 ;i++) {
			int moji = scan.nextInt();
			if(moji == 5) {
				five -= 1;
			}else if(moji == 7) {
				seven -= 1;
			}
		}
		if(five == 0 && seven == 0) {
			System.out.print("YES");
		}else {
			System.out.println("NO");
		}
		scan.close();

	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int five = 2; five 2 int seven = 1; seven 1 for(int i = 0;i <3 ;i++) {
			int moji = scan.nextInt();
			if(moji == 5) {
				five -= 1;
			}else if(moji == 7) {
				seven -= 1;
			}
		} int i = 0; int i = 0; i 0 i <3 i 3 i++ i++ i {
			int moji = scan.nextInt();
			if(moji == 5) {
				five -= 1;
			}else if(moji == 7) {
				seven -= 1;
			}
		} {
			int moji = scan.nextInt();
			if(moji == 5) {
				five -= 1;
			}else if(moji == 7) {
				seven -= 1;
			}
		} int moji = scan.nextInt(); moji scan.nextInt() scan.nextInt scan if(moji == 5) {
				five -= 1;
			}else if(moji == 7) {
				seven -= 1;
			} moji == 5 moji 5 {
				five -= 1;
			} five -= 1 five 1 if(moji == 7) {
				seven -= 1;
			} moji == 7 moji 7 {
				seven -= 1;
			} seven -= 1 seven 1 if(five == 0 && seven == 0) {
			System.out.print("YES");
		}else {
			System.out.println("NO");
		} five == 0 && seven == 0 five == 0 five 0 seven == 0 seven 0 {
			System.out.print("YES");
		} System.out.print("YES") System.out.print System.out System System.out "YES" {
			System.out.println("NO");
		} System.out.println("NO") System.out.println System.out System System.out "NO" scan.close() scan.close scan String[] args args public class Main{

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int five = 2;
		int seven = 1;
		for(int i = 0;i <3 ;i++) {
			int moji = scan.nextInt();
			if(moji == 5) {
				five -= 1;
			}else if(moji == 7) {
				seven -= 1;
			}
		}
		if(five == 0 && seven == 0) {
			System.out.print("YES");
		}else {
			System.out.println("NO");
		}
		scan.close();

	}

} public class Main{

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int five = 2;
		int seven = 1;
		for(int i = 0;i <3 ;i++) {
			int moji = scan.nextInt();
			if(moji == 5) {
				five -= 1;
			}else if(moji == 7) {
				seven -= 1;
			}
		}
		if(five == 0 && seven == 0) {
			System.out.print("YES");
		}else {
			System.out.println("NO");
		}
		scan.close();

	}

} Main
import java.util.Scanner;
public class Main{

	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int five = 2;
		int seven = 1;
		for(int i = 0;i <3 ;i++) {
			int moji = scan.nextInt();
			if(moji == 5) {
				five -= 1;
			}else if(moji == 7) {
				seven -= 1;
			}
		}
		if(five == 0 && seven == 0) {
			System.out.print("YES");
		}else {
			System.out.println("NO");
		}
		scan.close();

	}

}
