Language: C++

using System;
using System.IO;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using System.Numerics;
using System.Diagnostics;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using static System.Math;


class P
{
    static void Main()
    {
        int n = int.Parse(Console.ReadLine());
        int[] l = Console.ReadLine().Split().Select(int.Parse).OrderBy(x => x).ToArray();
        Console.WriteLine(l.Last() < l.Take(n - 1).Sum() ? "Yes" : "No");
    }
}


Compiler output:
a.cc:1:7: error: expected nested-name-specifier before 'System'
    1 | using System;
      |       ^~~~~~
a.cc:2:7: error: expected nested-name-specifier before 'System'
    2 | using System.IO;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Collections;
      |       ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
    5 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:6:7: error: expected nested-name-specifier before 'System'
    6 | using System.Numerics;
      |       ^~~~~~
a.cc:7:7: error: expected nested-name-specifier before 'System'
    7 | using System.Diagnostics;
      |       ^~~~~~
a.cc:8:7: error: expected nested-name-specifier before 'System'
    8 | using System.Text;
      |       ^~~~~~
a.cc:9:7: error: expected nested-name-specifier before 'System'
    9 | using System.Text.RegularExpressions;
      |       ^~~~~~
a.cc:10:7: error: expected nested-name-specifier before 'System'
   10 | using System.Threading.Tasks;
      |       ^~~~~~
a.cc:11:7: error: expected nested-name-specifier before 'System'
   11 | using System.Runtime.InteropServices;
      |       ^~~~~~
a.cc:12:7: error: expected nested-name-specifier before 'System'
   12 | using System.Runtime.CompilerServices;
      |       ^~~~~~
a.cc:13:7: error: expected nested-name-specifier before 'static'
   13 | using static System.Math;
      |       ^~~~~~
a.cc:24:2: error: expected ';' after class definition
   24 | }
      |  ^
      |  ;
a.cc: In static member function 'static void P::Main()':
a.cc:20:17: error: expected primary-expression before 'int'
   20 |         int n = int.Parse(Console.ReadLine());
      |                 ^~~
a.cc:21:12: error: structured binding declaration cannot have type 'int'
   21 |         int[] l = Console.ReadLine().Split().Select(int.Parse).OrderBy(x => x).ToArray();
      |            ^~
a.cc:21:12: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:21:12: error: empty structured binding declaration
a.cc:21:15: error: expected initializer before 'l'
   21 |         int[] l = Console.ReadLine().Split().Select(int.Parse).OrderBy(x => x).ToArray();
      |               ^
a.cc:22:9: error: 'Console' was not declared in this scope
   22 |         Console.WriteLine(l.Last() < l.Take(n - 1).Sum() ? "Yes" : "No");
      |         ^~~~~~~
a.cc:22:27: error: 'l' was not declared in this scope
   22 |         Console.WriteLine(l.Last() < l.Take(n - 1).Sum() ? "Yes" : "No");
      |                           ^