import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

class Main {

	public static void main(String[] args) throws Exception {

		try {

			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

			String[] inputStringList = br.readLine().split("\\s+");

			List<String> fiveList = new ArrayList<>();
			List<String> sevenList = new ArrayList<>();

			for (String inputString : inputStringList) {
				if (inputString.equals("5")) {
					fiveList.add(inputString);
				} else if (inputString.equals("7")) {
					sevenList.add(inputString);
				}
			}
			
			String result;
			if (fiveList.size() == 2 && sevenList.size() == 1) {
				result = "YES";
			} else {
				result = "NO";
			}
			
			System.out.println(result);
			
		} catch (IOException | NumberFormatException e) {
			e.printStackTrace();
			System.exit(0);
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(0);
		}

	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util class Main {

	public static void main(String[] args) throws Exception {

		try {

			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

			String[] inputStringList = br.readLine().split("\\s+");

			List<String> fiveList = new ArrayList<>();
			List<String> sevenList = new ArrayList<>();

			for (String inputString : inputStringList) {
				if (inputString.equals("5")) {
					fiveList.add(inputString);
				} else if (inputString.equals("7")) {
					sevenList.add(inputString);
				}
			}
			
			String result;
			if (fiveList.size() == 2 && sevenList.size() == 1) {
				result = "YES";
			} else {
				result = "NO";
			}
			
			System.out.println(result);
			
		} catch (IOException | NumberFormatException e) {
			e.printStackTrace();
			System.exit(0);
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(0);
		}

	}
} Main public static void main(String[] args) throws Exception {

		try {

			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

			String[] inputStringList = br.readLine().split("\\s+");

			List<String> fiveList = new ArrayList<>();
			List<String> sevenList = new ArrayList<>();

			for (String inputString : inputStringList) {
				if (inputString.equals("5")) {
					fiveList.add(inputString);
				} else if (inputString.equals("7")) {
					sevenList.add(inputString);
				}
			}
			
			String result;
			if (fiveList.size() == 2 && sevenList.size() == 1) {
				result = "YES";
			} else {
				result = "NO";
			}
			
			System.out.println(result);
			
		} catch (IOException | NumberFormatException e) {
			e.printStackTrace();
			System.exit(0);
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(0);
		}

	} main {

		try {

			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

			String[] inputStringList = br.readLine().split("\\s+");

			List<String> fiveList = new ArrayList<>();
			List<String> sevenList = new ArrayList<>();

			for (String inputString : inputStringList) {
				if (inputString.equals("5")) {
					fiveList.add(inputString);
				} else if (inputString.equals("7")) {
					sevenList.add(inputString);
				}
			}
			
			String result;
			if (fiveList.size() == 2 && sevenList.size() == 1) {
				result = "YES";
			} else {
				result = "NO";
			}
			
			System.out.println(result);
			
		} catch (IOException | NumberFormatException e) {
			e.printStackTrace();
			System.exit(0);
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(0);
		}

	} try {

			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

			String[] inputStringList = br.readLine().split("\\s+");

			List<String> fiveList = new ArrayList<>();
			List<String> sevenList = new ArrayList<>();

			for (String inputString : inputStringList) {
				if (inputString.equals("5")) {
					fiveList.add(inputString);
				} else if (inputString.equals("7")) {
					sevenList.add(inputString);
				}
			}
			
			String result;
			if (fiveList.size() == 2 && sevenList.size() == 1) {
				result = "YES";
			} else {
				result = "NO";
			}
			
			System.out.println(result);
			
		} catch (IOException | NumberFormatException e) {
			e.printStackTrace();
			System.exit(0);
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(0);
		} catch (IOException | NumberFormatException e) {
			e.printStackTrace();
			System.exit(0);
		} IOException | NumberFormatException e {
			e.printStackTrace();
			System.exit(0);
		} e.printStackTrace() e.printStackTrace e System.exit(0) System.exit System 0 catch (Exception e) {
			e.printStackTrace();
			System.exit(0);
		} Exception e {
			e.printStackTrace();
			System.exit(0);
		} e.printStackTrace() e.printStackTrace e System.exit(0) System.exit System 0 {

			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

			String[] inputStringList = br.readLine().split("\\s+");

			List<String> fiveList = new ArrayList<>();
			List<String> sevenList = new ArrayList<>();

			for (String inputString : inputStringList) {
				if (inputString.equals("5")) {
					fiveList.add(inputString);
				} else if (inputString.equals("7")) {
					sevenList.add(inputString);
				}
			}
			
			String result;
			if (fiveList.size() == 2 && sevenList.size() == 1) {
				result = "YES";
			} else {
				result = "NO";
			}
			
			System.out.println(result);
			
		} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] inputStringList = br.readLine().split("\\s+"); inputStringList br.readLine().split("\\s+") br.readLine().split br.readLine() br.readLine br "\\s+" List<String> fiveList = new ArrayList<>(); fiveList new ArrayList<>() List<String> sevenList = new ArrayList<>(); sevenList new ArrayList<>() for (String inputString : inputStringList) {
				if (inputString.equals("5")) {
					fiveList.add(inputString);
				} else if (inputString.equals("7")) {
					sevenList.add(inputString);
				}
			} String inputString inputStringList {
				if (inputString.equals("5")) {
					fiveList.add(inputString);
				} else if (inputString.equals("7")) {
					sevenList.add(inputString);
				}
			} {
				if (inputString.equals("5")) {
					fiveList.add(inputString);
				} else if (inputString.equals("7")) {
					sevenList.add(inputString);
				}
			} if (inputString.equals("5")) {
					fiveList.add(inputString);
				} else if (inputString.equals("7")) {
					sevenList.add(inputString);
				} inputString.equals("5") inputString.equals inputString "5" {
					fiveList.add(inputString);
				} fiveList.add(inputString) fiveList.add fiveList inputString if (inputString.equals("7")) {
					sevenList.add(inputString);
				} inputString.equals("7") inputString.equals inputString "7" {
					sevenList.add(inputString);
				} sevenList.add(inputString) sevenList.add sevenList inputString String result; result if (fiveList.size() == 2 && sevenList.size() == 1) {
				result = "YES";
			} else {
				result = "NO";
			} fiveList.size() == 2 && sevenList.size() == 1 fiveList.size() == 2 fiveList.size() fiveList.size fiveList 2 sevenList.size() == 1 sevenList.size() sevenList.size sevenList 1 {
				result = "YES";
			} result = "YES" result "YES" {
				result = "NO";
			} result = "NO" result "NO" System.out.println(result) System.out.println System.out System System.out result String[] args args
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.List;

class Main {

	public static void main(String[] args) throws Exception {

		try {

			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

			String[] inputStringList = br.readLine().split("\\s+");

			List<String> fiveList = new ArrayList<>();
			List<String> sevenList = new ArrayList<>();

			for (String inputString : inputStringList) {
				if (inputString.equals("5")) {
					fiveList.add(inputString);
				} else if (inputString.equals("7")) {
					sevenList.add(inputString);
				}
			}
			
			String result;
			if (fiveList.size() == 2 && sevenList.size() == 1) {
				result = "YES";
			} else {
				result = "NO";
			}
			
			System.out.println(result);
			
		} catch (IOException | NumberFormatException e) {
			e.printStackTrace();
			System.exit(0);
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(0);
		}

	}
}