Language: C++

import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.net.ConnectException;
import java.rmi.dgc.Lease;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Deque;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Objects;
import java.util.Set;
import java.util.Stack;
import java.util.TreeMap;
import java.util.TreeSet;

import static java.util.Comparator.*;

public class Main {
	public static void main(String[] args) {
		Main main = new Main();
		main.solve();
		main.out.close();
	}

	// ======================================================================
	public void solve() {
		int N = ni();
		int[] L = ni(N);
		Arrays.sort(L);
		int sum = 0;
		for (int i = 0; i < N-1; i++) {
			sum += L[i];
		}
		if(sum > L[N-1])	out.println("Yes");
		else				out.println("No");
	}
	// ------------------------------------------
	// ライブラリ
	// ------------------------------------------
	// Print
	private PrintWriter out = new PrintWriter(System.out);

	// Scanner
	private FastScanner scan = new FastScanner();

	int ni() {
		return scan.nextInt();
	}

	int[] ni(int n) {
		int[] a = new int[n];
		for (int i = 0; i < n; i++) {
			a[i] = ni();
		}
		return a;
	}

	int[][] ni(int y, int x) {
		int[][] a = new int[y][x];
		for (int i = 0; i < y; i++) {
			for (int j = 0; j < x; j++) {
				a[i][j] = ni();
			}
		}
		return a;
	}

	long nl() {
		return scan.nextLong();
	}

	long[] nl(int n) {
		long[] a = new long[n];
		for (int i = 0; i < n; i++) {
			a[i] = nl();
		}
		return a;
	}

	long[][] nl(int y, int x) {
		long[][] a = new long[y][x];
		for (int i = 0; i < y; i++) {
			for (int j = 0; j < x; j++) {
				a[i][j] = nl();
			}
		}
		return a;
	}

	String ns() {
		return scan.next();
	}

	String[] ns(int n) {
		String[] a = new String[n];
		for (int i = 0; i < n; i++) {
			a[i] = ns();
		}
		return a;
	}

	String[][] ns(int y, int x) {
		String[][] a = new String[y][x];
		for (int i = 0; i < y; i++) {
			for (int j = 0; j < x; j++) {
				a[i][j] = ns();
			}
		}
		return a;
	}
}

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;
	}

	public boolean hasNext() {
		while (hasNextByte() && !isPrintableChar(buffer[ptr]))
			ptr++;
		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();
		}
	}

	public int nextInt() {
		long nl = nextLong();
		if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)
			throw new NumberFormatException();
		return (int) nl;
	}

	public double nextDouble() {
		return Double.parseDouble(next());
	}
}


Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.io.IOException;
      | ^~~~~~
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.io.InputStream;
      | ^~~~~~
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.io.PrintWriter;
      | ^~~~~~
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.net.ConnectException;
      | ^~~~~~
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.rmi.dgc.Lease;
      | ^~~~~~
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.ArrayDeque;
      | ^~~~~~
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.ArrayList;
      | ^~~~~~
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.Arrays;
      | ^~~~~~
a.cc:8:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:9:1: error: 'import' does not name a type
    9 | import java.util.Collections;
      | ^~~~~~
a.cc:9:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:10:1: error: 'import' does not name a type
   10 | import java.util.Deque;
      | ^~~~~~
a.cc:10:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:11:1: error: 'import' does not name a type
   11 | import java.util.HashMap;
      | ^~~~~~
a.cc:11:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:12:1: error: 'import' does not name a type
   12 | import java.util.HashSet;
      | ^~~~~~
a.cc:12:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:13:1: error: 'import' does not name a type
   13 | import java.util.List;
      | ^~~~~~
a.cc:13:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:14:1: error: 'import' does not name a type
   14 | import java.util.Map;
      | ^~~~~~
a.cc:14:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:15:1: error: 'import' does not name a type
   15 | import java.util.NoSuchElementException;
      | ^~~~~~
a.cc:15:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:16:1: error: 'import' does not name a type
   16 | import java.util.Objects;
      | ^~~~~~
a.cc:16:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:17:1: error: 'import' does not name a type
   17 | import java.util.Set;
      | ^~~~~~
a.cc:17:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:18:1: error: 'import' does not name a type
   18 | import java.util.Stack;
      | ^~~~~~
a.cc:18:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:19:1: error: 'import' does not name a type
   19 | import java.util.TreeMap;
      | ^~~~~~
a.cc:19:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:20:1: error: 'import' does not name a type
   20 | import java.util.TreeSet;
      | ^~~~~~
a.cc:20:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:22:1: error: 'import' does not name a type
   22 | import static java.util.Comparator.*;
      | ^~~~~~
a.cc:22:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:24:1: error: expected unqualified-id before 'public'
   24 | public class Main {
      | ^~~~~~
a.cc:120:16: error: expected ':' before 'final'
  120 |         private final InputStream in = System.in;
      |                ^~~~~~
      |                :
a.cc:120:17: error: 'final' does not name a type
  120 |         private final InputStream in = System.in;
      |                 ^~~~~
a.cc:121:16: error: expected ':' before 'final'
  121 |         private final byte[] buffer = new byte[1024];
      |                ^~~~~~
      |                :
a.cc:121:17: error: 'final' does not name a type
  121 |         private final byte[] buffer = new byte[1024];
      |                 ^~~~~
a.cc:122:16: error: expected ':' before 'int'
  122 |         private int ptr = 0;
      |                ^~~~
      |                :
a.cc:123:16: error: expected ':' before 'int'
  123 |         private int buflen = 0;
      |                ^~~~
      |                :
a.cc:125:16: error: expected ':' before 'boolean'
  125 |         private boolean hasNextByte() {
      |                ^~~~~~~~
      |                :
a.cc:125:17: error: 'boolean' does not name a type; did you mean 'bool'?
  125 |         private boolean hasNextByte() {
      |                 ^~~~~~~
      |                 bool
a.cc:142:16: error: expected ':' before 'int'
  142 |         private int readByte() {
      |                ^~~~
      |                :
a.cc:149:16: error: expected ':' before 'static'
  149 |         private static boolean isPrintableChar(int c) {
      |                ^~~~~~~
      |                :
a.cc:149:24: error: 'boolean' does not name a type; did you mean 'bool'?
  149 |         private static boolean isPrintableChar(int c) {
      |                        ^~~~~~~
      |                        bool
a.cc:153:15: error: expected ':' before 'boolean'
  153 |         public boolean hasNext() {
      |               ^~~~~~~~
      |               :
a.cc:153:16: error: 'boolean' does not name a type; did you mean 'bool'?
  153 |         public boolean hasNext() {
      |                ^~~~~~~
      |                bool
a.cc:159:15: error: expected ':' before 'String'
  159 |         public String next() {
      |               ^~~~~~~
      |               :
a.cc:159:16: error: 'String' does not name a type
  159 |         public String next() {
      |                ^~~~~~
a.cc:171:15: error: expected ':' before 'long'
  171 |         public long nextLong() {
      |               ^~~~~
      |               :
a.cc:197:15: error: expected ':' before 'int'
  197 |         public int nextInt() {
      |               ^~~~
      |               :
a.cc:204:15: error: expected ':' before 'double'
  204 |         public double nextDouble() {
      |               ^~~~~~~
      |               :
a.cc:207:2: error: expected ';' after class definition
  207 | }
      |  ^
      |  ;
a.cc: In member function 'int FastScanner::readByte()':
a.cc:143:21: error: 'hasNextByte' was not declared in this scope
  143 |                 if (hasNextByte())
      |                     ^~~~~~~~~~~
a.cc:144:32: error: 'buffer' was not declared in this scope; did you mean 'buflen'?
  144 |                         return buffer[ptr++];
      |                                ^~~~~~
      |                                buflen
a.cc: In member function 'long int FastScanner::nextLong()':
a.cc:172:22: error: 'hasNext' was not declared in this scope
  172 |                 if (!hasNext())
      |                      ^~~~~~~
a.cc:173:35: error: expected type-specifier before 'NoSuchElementException'
  173 |                         throw new NoSuchElementException();
      |                                   ^~~~~~~~~~~~~~~~~~~~~~
a.cc:175:17: error: 'boolean' was not declared in this scope; did you mean 'bool'?
  175 |                 boolean minus = false;
      |                 ^~~~~~~
      |                 bool
a.cc:178:25: error: 'minus' was not declared in this scope
  178 |                         minus = true;
      |                         ^~~~~
a.cc:182:35: error: expected type-specifier before 'NumberFormatException'
  182 |                         throw new NumberFormatException();
      |                                   ^~~~~~~~~~~~~~~~~~~~~
a.cc:188:48: error: 'isPrintableChar' was not declared in this scope
  188 |                         } else if (b == -1 || !isPrintableChar(b)) {
      |                                                ^~~~~~~~~~~~~~~
a.cc:189:40: error: 'minus' was not declared in this scope
  189 |                                 return minus ? -n : n;
      |                                        ^~~~~
a.cc:191:43: error: expected type-specifier before 'NumberFormatException'
  191 |                                 throw new NumberFormatException();
      |                                           ^~~~~~~~~~~~~~~~~~~~~
a.cc: In member function 'int FastScanner::nextInt()':
a.cc:199:26: error: 'Integer' was not declared in this scope
  199 |                 if (nl < Integer.MIN_VALUE || nl > Integer.MAX_VALUE)
      |                          ^~~~~~~
a.cc:200:35: error: expected type-specifier before 'NumberFormatException'
  200 |                         throw new NumberFormatException();
      |                                   ^~~~~~~~~~~~~~~~~~~~~
a.cc: In member function 'double FastScanner::nextDouble()':
a.cc:205:24: error: 'Double' was not declared in this scope; did you mean 'double'?
  205 |                 return Double.parseDouble(next());
      |                        ^~~~~~
      |                        double
a.cc:205:43: error: 'next' was not declared in this scope; did you mean 'nextInt'?
  205 |                 return Double.parseDouble(next());
      |                                           ^~~~
      |                                           nextInt