Language: C++

import java.io.*;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.NoSuchElementException;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		FastScanner sc = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		
		
		while(sc.hasNext()) {
			boolean[] list = new boolean[10];
			int c1 = (int)sc.nextLong();
			int c2 = (int)sc.nextLong();
			int c3 = (int)sc.nextLong();
			list[c1-1] = true;
			list[c2-1] = true;
			list[c3-1] = true;
			
			int sum = 0;
			int g = 0;
			for(int i = 0; i < 10; i++) {
				if(!list[i]) {
					if(c1 + c2 + i+1  <= 20) {
						g++;
					}
					sum++;
				}
			}
			if((double)g/sum >= 0.5) {
				out.println("YES");
			}
			else {
				out.println("NO");
			}
		}
		out.flush();
	}
}
	
//------------------------------//
//-----------//
class FastScanner {
    private final InputStream in = System.in;
    private final byte[] buffer = new byte[1024];
    private int ptr = 0;
    private int buflen = 0;
    private boolean hasNextByte() {
        if (ptr < buflen) {
            return true;
        }else{
            ptr = 0;
            try {
                buflen = in.read(buffer);
            } catch (IOException e) {
                e.printStackTrace();
            }
            if (buflen <= 0) {
                return false;
            }
        }
        return true;
    }
    private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
    private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
    private void skipUnprintable() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;}
    public boolean hasNext() { skipUnprintable(); return hasNextByte();}
    public String next() {
        if (!hasNext()) throw new NoSuchElementException();
        StringBuilder sb = new StringBuilder();
        int b = readByte();
        while(isPrintableChar(b)) {
            sb.appendCodePoint(b);
            b = readByte();
        }
        return sb.toString();
    }
    public long nextLong() {
        if (!hasNext()) throw new NoSuchElementException();
        long n = 0;
        boolean minus = false;
        int b = readByte();
        if (b == '-') {
            minus = true;
            b = readByte();
        }
        if (b < '0' || '9' < b) {
            throw new NumberFormatException();
        }
        while(true){
            if ('0' <= b && b <= '9') {
                n *= 10;
                n += b - '0';
            }else if(b == -1 || !isPrintableChar(b)){
                return minus ? -n : n;
            }else{
                throw new NumberFormatException();
            }
            b = readByte();
        }
    }
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:2:1: error: 'import' does not name a type
    2 | import java.util.ArrayDeque;
      | ^~~~~~
a.cc:2:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:3:1: error: 'import' does not name a type
    3 | import java.util.ArrayList;
      | ^~~~~~
a.cc:3:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:1: error: 'import' does not name a type
    4 | import java.util.Arrays;
      | ^~~~~~
a.cc:4:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:5:1: error: 'import' does not name a type
    5 | import java.util.Collections;
      | ^~~~~~
a.cc:5:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:6:1: error: 'import' does not name a type
    6 | import java.util.Comparator;
      | ^~~~~~
a.cc:6:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:7:1: error: 'import' does not name a type
    7 | import java.util.NoSuchElementException;
      | ^~~~~~
a.cc:7:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:8:1: error: 'import' does not name a type
    8 | import java.util.Scanner;
      | ^~~~~~
a.cc:8:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:9:1: error: expected unqualified-id before 'public'
    9 | public class Main {
      | ^~~~~~
a.cc:48:12: error: expected ':' before 'final'
   48 |     private final InputStream in = System.in;
      |            ^~~~~~
      |            :
a.cc:48:13: error: 'final' does not name a type
   48 |     private final InputStream in = System.in;
      |             ^~~~~
a.cc:49:12: error: expected ':' before 'final'
   49 |     private final byte[] buffer = new byte[1024];
      |            ^~~~~~
      |            :
a.cc:49:13: error: 'final' does not name a type
   49 |     private final byte[] buffer = new byte[1024];
      |             ^~~~~
a.cc:50:12: error: expected ':' before 'int'
   50 |     private int ptr = 0;
      |            ^~~~
      |            :
a.cc:51:12: error: expected ':' before 'int'
   51 |     private int buflen = 0;
      |            ^~~~
      |            :
a.cc:52:12: error: expected ':' before 'boolean'
   52 |     private boolean hasNextByte() {
      |            ^~~~~~~~
      |            :
a.cc:52:13: error: 'boolean' does not name a type; did you mean 'bool'?
   52 |     private boolean hasNextByte() {
      |             ^~~~~~~
      |             bool
a.cc:68:12: error: expected ':' before 'int'
   68 |     private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
      |            ^~~~
      |            :
a.cc:69:12: error: expected ':' before 'static'
   69 |     private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
      |            ^~~~~~~
      |            :
a.cc:69:20: error: 'boolean' does not name a type; did you mean 'bool'?
   69 |     private static boolean isPrintableChar(int c) { return 33 <= c && c <= 126;}
      |                    ^~~~~~~
      |                    bool
a.cc:70:12: error: expected ':' before 'void'
   70 |     private void skipUnprintable() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;}
      |            ^~~~~
      |            :
a.cc:71:11: error: expected ':' before 'boolean'
   71 |     public boolean hasNext() { skipUnprintable(); return hasNextByte();}
      |           ^~~~~~~~
      |           :
a.cc:71:12: error: 'boolean' does not name a type; did you mean 'bool'?
   71 |     public boolean hasNext() { skipUnprintable(); return hasNextByte();}
      |            ^~~~~~~
      |            bool
a.cc:72:11: error: expected ':' before 'String'
   72 |     public String next() {
      |           ^~~~~~~
      |           :
a.cc:72:12: error: 'String' does not name a type
   72 |     public String next() {
      |            ^~~~~~
a.cc:82:11: error: expected ':' before 'long'
   82 |     public long nextLong() {
      |           ^~~~~
      |           :
a.cc:106:2: error: expected ';' after class definition
  106 | }
      |  ^
      |  ;
a.cc: In member function 'int FastScanner::readByte()':
a.cc:68:34: error: 'hasNextByte' was not declared in this scope
   68 |     private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
      |                                  ^~~~~~~~~~~
a.cc:68:56: error: 'buffer' was not declared in this scope; did you mean 'buflen'?
   68 |     private int readByte() { if (hasNextByte()) return buffer[ptr++]; else return -1;}
      |                                                        ^~~~~~
      |                                                        buflen
a.cc: In member function 'void FastScanner::skipUnprintable()':
a.cc:70:44: error: 'hasNextByte' was not declared in this scope
   70 |     private void skipUnprintable() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;}
      |                                            ^~~~~~~~~~~
a.cc:70:78: error: 'buffer' was not declared in this scope; did you mean 'buflen'?
   70 |     private void skipUnprintable() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;}
      |                                                                              ^~~~~~
      |                                                                              buflen
a.cc:70:62: error: 'isPrintableChar' was not declared in this scope
   70 |     private void skipUnprintable() { while(hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++;}
      |                                                              ^~~~~~~~~~~~~~~
a.cc: In member function 'long int FastScanner::nextLong()':
a.cc:83:14: error: 'hasNext' was not declared in this scope
   83 |         if (!hasNext()) throw new NoSuchElementException();
      |              ^~~~~~~
a.cc:83:35: error: expected type-specifier before 'NoSuchElementException'
   83 |         if (!hasNext()) throw new NoSuchElementException();
      |                                   ^~~~~~~~~~~~~~~~~~~~~~
a.cc:85:9: error: 'boolean' was not declared in this scope; did you mean 'bool'?
   85 |         boolean minus = false;
      |         ^~~~~~~
      |         bool
a.cc:88:13: error: 'minus' was not declared in this scope
   88 |             minus = true;
      |             ^~~~~
a.cc:92:23: error: expected type-specifier before 'NumberFormatException'
   92 |             throw new NumberFormatException();
      |                       ^~~~~~~~~~~~~~~~~~~~~
a.cc:98:34: error: 'isPrintableChar' was not declared in this scope
   98 |             }else if(b == -1 || !isPrintableChar(b)){
      |                                  ^~~~~~~~~~~~~~~
a.cc:99:24: error: 'minus' was not declared in this scope
   99 |                 return minus ? -n : n;
      |                        ^~~~~
a.cc:101:27: error: expected type-specifier before 'NumberFormatException'
  101 |                 throw new NumberFormatException();
      |                           ^~~~~~~~~~~~~~~~~~~~~