Language: C++

using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Text;
namespace AtCoder {
    class MainClass {

        int a, b, c;
        void Solve() {
            a = io.nextInt();
            b = io.nextInt();
            c = io.nextInt();

            bool isBeauty = (b - a) == (c - b);

            io.o(isBeauty ? "YES" : "NO");

        }

        int ManhattanDis(int x1, int y1, int x2, int y2) {
            return Math.Abs(x1 - x2) + Math.Abs(y1 - y2);
        }

        public static void Main(string[] args) { new MainClass().Stream(); }
        IO io = new IO();
        void Stream() { Solve(); io.writeFlush(); }

        class IO {
            string[] nextBuffer; int BufferCnt; char[] cs = new char[] { ' ' };
            StreamWriter sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
            public IO() { nextBuffer = new string[0]; BufferCnt = 0; Console.SetOut(sw); }
            public string next() {
                if (BufferCnt < nextBuffer.Length) return nextBuffer[BufferCnt++];
                string st = Console.ReadLine();
                while (st == "") st = Console.ReadLine();
                nextBuffer = st.Split(cs, StringSplitOptions.RemoveEmptyEntries);
                BufferCnt = 0;
                return nextBuffer[BufferCnt++];
            }
            public char nextChar() { return char.Parse(next()); }
            public int nextInt() { return int.Parse(next()); }
            public long nextLong() { return long.Parse(next()); }
            public double nextDouble() { return double.Parse(next()); }
            public string[] array() { return Console.ReadLine().Split(' '); }
            public char[] arrayChar() { return Array.ConvertAll(array(), char.Parse); }
            public int[] arrayInt() { return Array.ConvertAll(array(), int.Parse); }
            public long[] arrayLong() { return Array.ConvertAll(array(), long.Parse); }
            public double[] arrayDouble() { return Array.ConvertAll(array(), double.Parse); }
            private bool typeEQ<T, U>() { return typeof(T).Equals(typeof(U)); }
            private T convertType<T, U>() { return (T)Convert.ChangeType(typeof(U), typeof(T)); }
            public void i<T>(out T v) {//微妙かも
                if (typeEQ<T, int>()) { v = (T)Convert.ChangeType(nextInt(), typeof(T)); return; }
                if (typeEQ<T, long>()) { v = (T)Convert.ChangeType(nextLong(), typeof(T)); return; }
                if (typeEQ<T, double>()) { v = (T)Convert.ChangeType(nextDouble(), typeof(T)); return; }
                if (typeEQ<T, char>()) { v = (T)Convert.ChangeType(nextChar(), typeof(T)); return; }
                v = (T)Convert.ChangeType(next(), typeof(T)); return;//string
            }
            public void o<T>(T v) { Console.WriteLine(v); }
            public void o<T>(T[] a) { foreach (T v in a) Console.WriteLine(v); }
            public void o<T>(List<T> l) { foreach (T v in l) sw.WriteLine(v); }
            public void writeFlush() { Console.Out.Flush(); }
        }

        class Mathf {
            public int mod = 1000000007;//10^9+7
            public long Pow(long a, long b) {
                if (b == 0) return 1;
                if (b % 2 == 1) return (a % mod * Pow(a % mod, b - 1) % mod) % mod;
                else return Pow(a * a % mod, b / 2) % mod;
            }
            public long Fact(long n) { return n != 0 ? (n % mod * (Fact(n - 1) % mod) % mod) : 1; }
            public long C(long n, long r) {
                if (r == 0 || n == r) return 1;
                else return (Fact(n) % mod * Pow((Fact(n - r) % mod * Fact(r) % mod) % mod, mod - 2) % mod) % mod;
            }
            public int GCD(int a, int b) { if (a < b) Swap(ref a, ref b); return b == 0 ? a : GCD(b, a % b); }
            public int GCD(int[] array) { return array.Aggregate((v, next) => GCD(v, next)); }
            public void Swap<T>(ref T a, ref T b) { T tmp = a; a = b; b = tmp; }
            public T Max<T>(params T[] v) { return v.Max(); }
            public T Min<T>(params T[] v) { return v.Min(); }
        }
    }
}

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.Collections;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Collections.Generic;
      |       ^~~~~~
a.cc:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Diagnostics;
      |       ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
    5 | using System.IO;
      |       ^~~~~~
a.cc:6:7: error: expected nested-name-specifier before 'System'
    6 | using System.Linq;
      |       ^~~~~~
a.cc:7:7: error: expected nested-name-specifier before 'System'
    7 | using System.Text;
      |       ^~~~~~
a.cc:27:15: error: expected ':' before 'static'
   27 |         public static void Main(string[] args) { new MainClass().Stream(); }
      |               ^~~~~~~
      |               :
a.cc:27:33: error: 'string' has not been declared
   27 |         public static void Main(string[] args) { new MainClass().Stream(); }
      |                                 ^~~~~~
a.cc:27:42: error: expected ',' or '...' before 'args'
   27 |         public static void Main(string[] args) { new MainClass().Stream(); }
      |                                          ^~~~
a.cc:28:9: error: 'IO' does not name a type
   28 |         IO io = new IO();
      |         ^~
a.cc:32:13: error: 'string' does not name a type
   32 |             string[] nextBuffer; int BufferCnt; char[] cs = new char[] { ' ' };
      |             ^~~~~~
a.cc:32:53: error: expected unqualified-id before '[' token
   32 |             string[] nextBuffer; int BufferCnt; char[] cs = new char[] { ' ' };
      |                                                     ^
a.cc:33:13: error: 'StreamWriter' does not name a type
   33 |             StreamWriter sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
      |             ^~~~~~~~~~~~
a.cc:34:19: error: expected ':' before 'IO'
   34 |             public IO() { nextBuffer = new string[0]; BufferCnt = 0; Console.SetOut(sw); }
      |                   ^~~
      |                   :
a.cc:35:19: error: expected ':' before 'string'
   35 |             public string next() {
      |                   ^~~~~~~
      |                   :
a.cc:35:20: error: 'string' does not name a type
   35 |             public string next() {
      |                    ^~~~~~
a.cc:43:19: error: expected ':' before 'char'
   43 |             public char nextChar() { return char.Parse(next()); }
      |                   ^~~~~
      |                   :
a.cc:44:19: error: expected ':' before 'int'
   44 |             public int nextInt() { return int.Parse(next()); }
      |                   ^~~~
      |                   :
a.cc:45:19: error: expected ':' before 'long'
   45 |             public long nextLong() { return long.Parse(next()); }
      |                   ^~~~~
      |                   :
a.cc:46:19: error: expected ':' before 'double'
   46 |             public double nextDouble() { return double.Parse(next()); }
      |                   ^~~~~~~
      |                   :
a.cc:47:19: error: expected ':' before 'string'
   47 |             public string[] array() { return Console.ReadLine().Split(' '); }
      |                   ^~~~~~~
      |                   :
a.cc:47:20: error: 'string' does not name a type
   47 |             public string[] array() { return Console.ReadLine().Split(' '); }
      |                    ^~~~~~
a.cc:48:19: error: expected ':' before 'char'
   48 |             public char[] arrayChar() { return Array.ConvertAll(array(), char.Parse); }
      |                   ^~~~~
      |                   :
a.cc:48:24: error: expected unqualified-id before '[' token
   48 |             public char[] arrayChar() { return Array.ConvertAll(array(), char.Parse); }
      |                        ^
a.cc:49:19: error: expected ':' before 'int'
   49 |             public int[] arrayInt() { return Array.ConvertAll(array(), int.Parse); }
      |                   ^~~~
      |                   :
a.cc:49:23: error: expected unqualified-id before '[' token
   49 |             public int[] arrayInt() { return Array.ConvertAll(array(), int.Parse); }
      |                       ^
a.cc:50:19: error: expected ':' before 'long'
   50 |             public long[] arrayLong() { return Array.ConvertAll(array(), long.Parse); }
      |                   ^~~~~
      |                   :
a.cc:50:24: error: expected unqualified-id before '[' token
   50 |             public long[] arrayLong() { return Array.ConvertAll(array(), long.Parse); }
      |                        ^
a.cc:51:19: error: expected ':' before 'double'
   51 |             public double[] arrayDouble() { return Array.ConvertAll(array(), double.Parse); }
      |                   ^~~~~~~
      |                   :
a.cc:51:26: error: expected unqualified-id before '[' token
   51 |             public double[] arrayDouble() { return Array.ConvertAll(array(), double.Parse); }
      |                          ^
a.cc:52:20: error: expected ':' before 'bool'
   52 |             private bool typeEQ<T, U>() { return typeof(T).Equals(typeof(U)); }
      |                    ^~~~~
      |                    :
a.cc:52:26: error: expected ';' at end of member declaration
   52 |             private bool typeEQ<T, U>() { return typeof(T).Equals(typeof(U)); }
      |                          ^~~~~~
      |                                ;
a.cc:52:32: error: expected unqualified-id before '<' token
   52 |             private bool typeEQ<T, U>() { return typeof(T).Equals(typeof(U)); }
      |                                ^
a.cc:53:20: error: expected ':' before 'T'
   53 |             private T convertType<T, U>() { return (T)Convert.ChangeType(typeof(U), typeof(T)); }
      |                    ^~
      |                    :
a.cc:53:21: error: 'T' does not name a type
   53 |             private T convertType<T, U>() { return (T)Convert.ChangeType(typeof(U), typeof(T)); }
      |                     ^
a.cc:54:19: error: expected ':' before 'void'
   54 |             public void i<T>(out T v) {//微妙かも
      |                   ^~~~~
      |                   :
a.cc:54:25: error: variable or field 'i' declared void
   54 |             public void i<T>(out T v) {//微妙かも
      |                         ^
a.cc:54:25: error: expected ';' at end of member declaration
   54 |             public void i<T>(out T v) {//微妙かも
      |                         ^
      |                          ;
a.cc:54:26: error: expected unqualified-id before '<' token
   54 |             public void i<T>(out T v) {//微妙かも
      |                          ^
a.cc:61:19: error: expected ':' before 'void'
   61 |             public void o<T>(T v) { Console.WriteLine(v); }
      |                   ^~~~~
      |                   :
a.cc:61:25: error: variable or field 'o' declared void
   61 |             public void o<T>(T v) { Console.WriteLine(v); }
      |                         ^
a.cc:61:25: error: expected ';' at end of member declaration
   61 |             public void o<T>(T v) { Console.WriteLine(v); }
      |                         ^
      |                          ;
a.cc:61:26: error: expected unqualified-id before '<' token
   61 |             public void o<T>(T v) { Console.WriteLine(v); }
      |                          ^
a.cc:62:19: error: expected ':' before 'void'
   62 |             public void o<T>(T[] a) { foreach (T v in a) Console.WriteLine(v); }
      |                   ^~~~~
      |                   :
a.cc:62:25: error: variable or field 'o' declared void
   62 |             public void o<T>(T[] a) { foreach (T v in a) Console.WriteLine(v); }
      |                         ^
a.cc:62:25: error: expected ';' at end of member declaration
   62 |             public void o<T>(T[] a) { foreach (T v in a) Console.WriteLine(v); }
      |                         ^
      |                          ;
a.cc:62:26: error: expected unqualified-id before '<' token
   62 |             public void o<T>(T[] a) { foreach (T v in a) Console.WriteLine(v); }
      |                          ^
a.cc:63:19: error: expected ':' before 'void'
   63 |             public void o<T>(List<T> l) { foreach (T v in l) sw.WriteLine(v); }
      |                   ^~~~~
      |                   :
a.cc:63:25: error: variable or field 'o' declared void
   63 |             public void o<T>(List<T> l) { foreach (T v in l) sw.WriteLine(v); }
      |                         ^
a.cc:63:25: error: expected ';' at end of member declaration
   63 |             public void o<T>(List<T> l) { foreach (T v in l) sw.WriteLine(v); }
      |                         ^
      |                          ;
a.cc:63:26: error: expected unqualified-id before '<' token
   63 |             public void o<T>(List<T> l) { foreach (T v in l) sw.WriteLine(v); }
      |                          ^
a.cc:64:19: error: expected ':' before 'void'
   64 |             public void writeFlush() { Console.Out.Flush(); }
      |                   ^~~~~
      |                   :
a.cc:65:10: error: expected ';' after class definition
   65 |         }
      |          ^
      |          ;
a.cc:68:19: error: expected ':' before 'int'
   68 |             public int mod = 1000000007;//10^9+7
      |                   ^~~~
      |                   :
a.cc:69:19: error: expected ':' before 'long'
   69 |             public long Pow(long a, long b) {
      |                   ^~~~~
      |                   :
a.cc:74:19: error: expected ':' before 'long'
   74 |             public long Fact(long n) { return n != 0 ? (n % mod * (Fact(n - 1) % mod) % mod) : 1; }
      |                   ^~~~~
      |                   :
a.cc:75:19: error: expected ':' before 'long'
   75 |             public long C(long n, long r) {
      |                   ^~~~~
      |                   :
a.cc:79:19: error: expected ':' before 'int'
   79 |             public int GCD(int a, int b) { if (a < b) Swap(ref a, ref b); return b == 0 ? a : GCD(b, a % b); }
      |