Language: C++

using System;
using System.Collections.Generic;
using System.Linq;

namespace AtCoder
{
    class Program
    {
        static void Main(string[] args)
        {
            input_iter = LazyLoadAllLines();
            //------------------------------------------------//
            //var h = Read<long>();
            //var n = Read<long>();
            //var m = Read<long>();
            //var s = Read();
            //var cls = Read<long>(n);
            //var bls = Read<long>(n);
            //var sls = Read(n);
            /*List<(string s, long c)> scls = new List<(string s, long c)>();
            for (int i = 0; i < m; ++i)
            {
                scls.Add((Read(), Read<long>()));
            }*/
            //List<List<long>> abls = new List<List<long>>();
            //List<long> cls = new List<long>();
            /*List<long> edgeNum = Enumerable.Repeat(0L, (int)n).ToList();
            for (int i = 0; i < n - 1; ++i)
            {
                abls.Add(Read<long>(2));
                abls[i].Add(i);
                abls[i].Add(-1);
                --abls[i][0];
                --abls[i][1];
                //cls.Add(Read<long>());
                ++edgeNum[(int)abls[i][0]];
                ++edgeNum[(int)abls[i][1]];
            }*/

            //als.Sort((l, r) => (int)(r - l));

            var s = Read();
            var t = Read();
            var a = Read<long>();
            var b = Read<long>();
            var u = Read();

            Console.WriteLine(s == u ? $"{a - 1} {b}" : $"{a} {b - 1}");
        }

        static IEnumerator<string> input_iter;

        static IEnumerator<string> LazyLoadAllLines(bool doSplit = true)
        {
            string line;
            if (doSplit)
            {
                do
                {
                    line = Console.ReadLine();
                    foreach (var s in line.Split(' '))
                        yield return s;
                } while (line != null);
            }
            else
            {
                do
                {
                    line = Console.ReadLine();
                    yield return line;
                } while (line != null);
            }
        }
        static _T Read<_T>() where _T : struct
        {
            input_iter.MoveNext();
            return (_T)Convert.ChangeType(input_iter.Current, typeof(_T));
        }
        static string Read()
        {
            input_iter.MoveNext();
            return input_iter.Current;
        }
        static List<_T> Read<_T>(long num) where _T : struct
        {
            List<_T> res = new List<_T>();
            for (long i = 0; i < num; ++i)
            {
                input_iter.MoveNext();
                res.Add((_T)Convert.ChangeType(input_iter.Current, typeof(_T)));
            }
            return res;
        }
        static List<string> Read(long num)
        {
            List<string> res = new List<string>();
            for (long i = 0; i < num; ++i)
            {
                input_iter.MoveNext();
                res.Add(input_iter.Current);
            }
            return res;
        }

    }
}


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.Generic;
      |       ^~~~~~
a.cc:3:7: error: expected nested-name-specifier before 'System'
    3 | using System.Linq;
      |       ^~~~~~
a.cc:9:26: error: 'string' has not been declared
    9 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:9:35: error: expected ',' or '...' before 'args'
    9 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:51:16: error: 'IEnumerator' does not name a type
   51 |         static IEnumerator<string> input_iter;
      |                ^~~~~~~~~~~
a.cc:53:16: error: 'IEnumerator' does not name a type
   53 |         static IEnumerator<string> LazyLoadAllLines(bool doSplit = true)
      |                ^~~~~~~~~~~
a.cc:74:16: error: '_T' does not name a type
   74 |         static _T Read<_T>() where _T : struct
      |                ^~
a.cc:79:16: error: 'string' does not name a type
   79 |         static string Read()
      |                ^~~~~~
a.cc:84:16: error: 'List' does not name a type
   84 |         static List<_T> Read<_T>(long num) where _T : struct
      |                ^~~~
a.cc:94:16: error: 'List' does not name a type
   94 |         static List<string> Read(long num)
      |                ^~~~
a.cc:105:6: error: expected ';' after class definition
  105 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void AtCoder::Program::Main(int*)':
a.cc:11:13: error: 'input_iter' was not declared in this scope
   11 |             input_iter = LazyLoadAllLines();
      |             ^~~~~~~~~~
a.cc:11:26: error: 'LazyLoadAllLines' was not declared in this scope
   11 |             input_iter = LazyLoadAllLines();
      |                          ^~~~~~~~~~~~~~~~
a.cc:42:13: error: 'var' was not declared in this scope
   42 |             var s = Read();
      |             ^~~
a.cc:43:17: error: expected ';' before 't'
   43 |             var t = Read();
      |                 ^
a.cc:44:17: error: expected ';' before 'a'
   44 |             var a = Read<long>();
      |                 ^
a.cc:45:17: error: expected ';' before 'b'
   45 |             var b = Read<long>();
      |                 ^
a.cc:46:17: error: expected ';' before 'u'
   46 |             var u = Read();
      |                 ^
a.cc:48:13: error: 'Console' was not declared in this scope
   48 |             Console.WriteLine(s == u ? $"{a - 1} {b}" : $"{a} {b - 1}");
      |             ^~~~~~~
a.cc:48:31: error: 's' was not declared in this scope
   48 |             Console.WriteLine(s == u ? $"{a - 1} {b}" : $"{a} {b - 1}");
      |                               ^
a.cc:48:36: error: 'u' was not declared in this scope
   48 |             Console.WriteLine(s == u ? $"{a - 1} {b}" : $"{a} {b - 1}");
      |                                    ^
a.cc:48:40: error: '$' was not declared in this scope
   48 |             Console.WriteLine(s == u ? $"{a - 1} {b}" : $"{a} {b - 1}");
      |                                        ^
a.cc:48:41: error: expected ':' before string constant
   48 |             Console.WriteLine(s == u ? $"{a - 1} {b}" : $"{a} {b - 1}");
      |                                         ^~~~~~~~~~~~~