Language: C++

using System;
using System.Text;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
using static System.Convert;
using static System.Console;
using static System.Math;

namespace AtCorder
{
    class Program
    {
        static void Main(string[] args)
        {
            new Program().Solve(new ConsoleInput(Console.In, ' '));
        }


        public void Solve(ConsoleInput cin)
        {
            var a = cin.ReadInt;
            var b = cin.ReadInt;

            if (a <= 9 && b <= 9)
            {
                WriteLine(a * b);
            }
            else
            {
                WriteLine(-1);
            }
        }


        public class ConsoleInput
        {
            private readonly System.IO.TextReader _stream;
            private char _separator = ' ';
            private Queue<string> inputStream;
            public ConsoleInput(System.IO.TextReader stream, char separator = ' ')
            {
                this._separator = separator;
                this._stream = stream;
                inputStream = new Queue<string>();
            }
            public string Read
            {
                get
                {
                    if (inputStream.Count != 0) return inputStream.Dequeue();
                    string[] tmp = _stream.ReadLine().Split(_separator);
                    for (int i = 0; i < tmp.Length; ++i)
                        inputStream.Enqueue(tmp[i]);
                    return inputStream.Dequeue();
                }
            }
            public string ReadLine { get { return _stream.ReadLine(); } }
            public int ReadInt { get { return int.Parse(Read); } }
            public long ReadLong { get { return long.Parse(Read); } }
            public double ReadDouble { get { return double.Parse(Read); } }
            public string[] ReadStrArray(long N) { var ret = new string[N]; for (long i = 0; i < N; ++i) ret[i] = Read; return ret; }
            public int[] ReadIntArray(long N) { var ret = new int[N]; for (long i = 0; i < N; ++i) ret[i] = ReadInt; return ret; }
            public long[] ReadLongArray(long N) { var ret = new long[N]; for (long i = 0; i < N; ++i) ret[i] = ReadLong; return ret; }
        }
    }
}


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.Text;
      |       ^~~~~~
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 'static'
    6 | using static System.Convert;
      |       ^~~~~~
a.cc:7:7: error: expected nested-name-specifier before 'static'
    7 | using static System.Console;
      |       ^~~~~~
a.cc:8:7: error: expected nested-name-specifier before 'static'
    8 | using static System.Math;
      |       ^~~~~~
a.cc:14:26: error: 'string' has not been declared
   14 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:14:35: error: expected ',' or '...' before 'args'
   14 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:20:15: error: expected ':' before 'void'
   20 |         public void Solve(ConsoleInput cin)
      |               ^~~~~
      |               :
a.cc:20:27: error: 'ConsoleInput' has not been declared
   20 |         public void Solve(ConsoleInput cin)
      |                           ^~~~~~~~~~~~
a.cc:36:15: error: expected ':' before 'class'
   36 |         public class ConsoleInput
      |               ^~~~~~
      |               :
a.cc:38:20: error: expected ':' before 'readonly'
   38 |             private readonly System.IO.TextReader _stream;
      |                    ^~~~~~~~~
      |                    :
a.cc:38:21: error: 'readonly' does not name a type
   38 |             private readonly System.IO.TextReader _stream;
      |                     ^~~~~~~~
a.cc:39:20: error: expected ':' before 'char'
   39 |             private char _separator = ' ';
      |                    ^~~~~
      |                    :
a.cc:40:20: error: expected ':' before 'Queue'
   40 |             private Queue<string> inputStream;
      |                    ^~~~~~
      |                    :
a.cc:40:21: error: 'Queue' does not name a type
   40 |             private Queue<string> inputStream;
      |                     ^~~~~
a.cc:41:19: error: expected ':' before 'ConsoleInput'
   41 |             public ConsoleInput(System.IO.TextReader stream, char separator = ' ')
      |                   ^~~~~~~~~~~~~
      |                   :
a.cc:41:39: error: expected ')' before '.' token
   41 |             public ConsoleInput(System.IO.TextReader stream, char separator = ' ')
      |                                ~      ^
      |                                       )
a.cc:47:19: error: expected ':' before 'string'
   47 |             public string Read
      |                   ^~~~~~~
      |                   :
a.cc:47:20: error: 'string' does not name a type
   47 |             public string Read
      |                    ^~~~~~
a.cc:58:19: error: expected ':' before 'string'
   58 |             public string ReadLine { get { return _stream.ReadLine(); } }
      |                   ^~~~~~~
      |                   :
a.cc:58:20: error: 'string' does not name a type
   58 |             public string ReadLine { get { return _stream.ReadLine(); } }
      |                    ^~~~~~
a.cc:59:19: error: expected ':' before 'int'
   59 |             public int ReadInt { get { return int.Parse(Read); } }
      |                   ^~~~
      |                   :
a.cc:59:66: error: expected ';' at end of member declaration
   59 |             public int ReadInt { get { return int.Parse(Read); } }
      |                                                                  ^
      |                                                                   ;
a.cc:60:19: error: expected ':' before 'long'
   60 |             public long ReadLong { get { return long.Parse(Read); } }
      |                   ^~~~~
      |                   :
a.cc:60:69: error: expected ';' at end of member declaration
   60 |             public long ReadLong { get { return long.Parse(Read); } }
      |                                                                     ^
      |                                                                      ;
a.cc:61:19: error: expected ':' before 'double'
   61 |             public double ReadDouble { get { return double.Parse(Read); } }
      |                   ^~~~~~~
      |                   :
a.cc:61:75: error: expected ';' at end of member declaration
   61 |             public double ReadDouble { get { return double.Parse(Read); } }
      |                                                                           ^
      |                                                                            ;
a.cc:62:19: error: expected ':' before 'string'
   62 |             public string[] ReadStrArray(long N) { var ret = new string[N]; for (long i = 0; i < N; ++i) ret[i] = Read; return ret; }
      |                   ^~~~~~~
      |                   :
a.cc:62:20: error: 'string' does not name a type
   62 |             public string[] ReadStrArray(long N) { var ret = new string[N]; for (long i = 0; i < N; ++i) ret[i] = Read; return ret; }
      |                    ^~~~~~
a.cc:63:19: error: expected ':' before 'int'
   63 |             public int[] ReadIntArray(long N) { var ret = new int[N]; for (long i = 0; i < N; ++i) ret[i] = ReadInt; return ret; }
      |                   ^~~~
      |                   :
a.cc:63:23: error: expected unqualified-id before '[' token
   63 |             public int[] ReadIntArray(long N) { var ret = new int[N]; for (long i = 0; i < N; ++i) ret[i] = ReadInt; return ret; }
      |                       ^
a.cc:64:19: error: expected ':' before 'long'
   64 |             public long[] ReadLongArray(long N) { var ret = new long[N]; for (long i = 0; i < N; ++i) ret[i] = ReadLong; return ret; }
      |                   ^~~~~
      |                   :
a.cc:64:24: error: expected unqualified-id before '[' token
   64 |             public long[] ReadLongArray(long N) { var ret = new long[N]; for (long i = 0; i < N; ++i) ret[i] = ReadLong; return ret; }
      |                        ^
a.cc:65:10: error: expected ';' after class definition
   65 |         }
      |          ^
      |          ;
a.cc:66:6: error: expected ';' after class definition
   66 |     }
      |      ^
      |      ;
a.cc:59:34: error: 'get' was not declared in this scope
   59 |             public int ReadInt { get { return int.Parse(Read); } }
      |                                  ^~~
a.cc:59:38: error: expected '}' before '{' token
   59 |             public int ReadInt { get { return int.Parse(Read); } }
      |                                      ^
a.cc:59:32: note: to match this '{'
   59 |             public int ReadInt { get { return int.Parse(Read); } }
      |                                ^
a.cc:59:38: error: cannot convert '<brace-enclosed initializer list>' to 'int' in initialization
   59 |             public int ReadInt { get { return int.Parse(Read); } }
      |                                      ^
a.cc:59:38: error: expected ';' before '{' token
a.cc:60:36: error: 'get' was not declared in this scope
   60 |             public long ReadLong { get { return long.Parse(Read); } }
      |                                    ^~~
a.cc:60:40: error: expected '}' before '{' token
   60 |             public long ReadLong { get { return long.Parse(Read); } }
      |                                        ^
a.cc:60:34: note: to match this '{'
   60 |             public long ReadLong { get { return long.Parse(Read); } }
      |                                  ^
a.cc:60:40: error: cannot convert '<brace-enclosed initializer list>' to 'long int' in initialization
   60 |             public long ReadLong { get { return long.Parse(Read); } }
      |                                        ^
a.cc:60:40: error: expected ';' before '{' token
a.cc:61:40: error: 'get' was not declared in this scope
   61 |             public double ReadDouble { get { return double.Parse(Read); } }
      |                                        ^~~
a.cc:61:44: error: expected '}' before '{' token
   61 |             public double ReadDouble { get { return double.Parse(Read); } }
      |                                            ^
a.cc:61:38: note: to match this '{'
   61 |             public double ReadDouble { get { return double.Parse(Read); } }
      |                                      ^
a.cc:61:44: error: cannot convert '<brace-enclosed initializer list>' to 'double' in initialization
   61 |             public double ReadDouble { get { return double.Parse(Read); } }
      |                                            ^
a.cc:61:44: error: expected ';' before '{' token
a.cc: In static member function 'static void AtCorder::Program::Main(int*)':
a.cc:16:26: error: expected ';' before '.' token
   16 |             new Program().Solve(new ConsoleInput(Console.In, ' '));
      |                          ^
a.cc: In member function 'void AtCorder::Program::Solve(int)':
a.cc:22:13: error: 'var' was not declared in this scope
   22 |             var a = cin.ReadInt;
      |             ^~~
a.cc:23:17: error: expected ';' before 'b'
   23 |             var b = cin.ReadInt;
      |                 ^
a.cc:25:17: error: 'a' was not declared in this scope
   25 |             if (a <= 9 && b <= 9)
      |                 ^
a.cc:25:27: error: 'b' was not declared in this scope
   25 |             if (a <= 9 && b <= 9)
      |                           ^
a.cc:27:17: error: 'WriteLine' was not declared in this scope
   27 |                 WriteLine(a * b);
      |                 ^~~~~~~~~
a.cc:31:17: error: 'WriteLine' was not declared in this scope
   31 |                 WriteLine(-1);
      |                 ^~~~~~~~~