Language: C++

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

namespace atcorder2
{
    class Program
    {
        public static long Read()
        {
            return long.Parse(Console.ReadLine());
        }

        public static long[] Reads()
        {

            return Console.ReadLine().Split().Select(long.Parse).ToArray();
        }


        public static long GCM(long x, long y)
        {
            var s = x;
            var t = y;
            if (x < y) GCM(y, x);
            while (y != 0)
            {
                var z = x % y;
                x = y;
                y = z;
            }
            return s / x * t;
        }



        static void Main(string[] args)
        {
            var sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
            Console.SetOut(sw);

            var input = Reads();
            var n = input[0];
            var y = input[1];
            var a = y / 10000 + 1;
            var b = y / 5000 + 1;
            long ans1 = -1;
            long ans2 = -1;
            long ans3 = -1;
            bool f = false;
            for (int i = 0; i < a; i++)
            {
                for (int j = 0; j < b; j++)
                {
                    if ((y - 10000 * i - 5000 * j) / 1000 == n - i - j&&n-i-j>=0)
                    {
                        ans1 = i;
                        ans2 = j;
                        ans3 = n - i - j;
               
                        break;
                    }
                }
            }
            Console.WriteLine("{0} {1} {2}", ans1, ans2, ans3);

            Console.Out.Flush();
        }
    }
}




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.Linq;
      |       ^~~~~~
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.IO;
      |       ^~~~~~
a.cc:10:15: error: expected ':' before 'static'
   10 |         public static long Read()
      |               ^~~~~~~
      |               :
a.cc:15:15: error: expected ':' before 'static'
   15 |         public static long[] Reads()
      |               ^~~~~~~
      |               :
a.cc:15:27: error: expected unqualified-id before '[' token
   15 |         public static long[] Reads()
      |                           ^
a.cc:22:15: error: expected ':' before 'static'
   22 |         public static long GCM(long x, long y)
      |               ^~~~~~~
      |               :
a.cc:38:26: error: 'string' has not been declared
   38 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:38:35: error: expected ',' or '...' before 'args'
   38 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:70:6: error: expected ';' after class definition
   70 |     }
      |      ^
      |      ;
a.cc: In static member function 'static long int atcorder2::Program::Read()':
a.cc:12:20: error: expected primary-expression before 'long'
   12 |             return long.Parse(Console.ReadLine());
      |                    ^~~~
a.cc:12:20: error: expected ';' before 'long'
a.cc:12:24: error: expected unqualified-id before '.' token
   12 |             return long.Parse(Console.ReadLine());
      |                        ^
a.cc: In static member function 'static long int atcorder2::Program::GCM(long int, long int)':
a.cc:24:13: error: 'var' was not declared in this scope
   24 |             var s = x;
      |             ^~~
a.cc:25:17: error: expected ';' before 't'
   25 |             var t = y;
      |                 ^
a.cc:29:21: error: expected ';' before 'z'
   29 |                 var z = x % y;
      |                     ^
a.cc:31:21: error: 'z' was not declared in this scope
   31 |                 y = z;
      |                     ^
a.cc:33:20: error: 's' was not declared in this scope
   33 |             return s / x * t;
      |                    ^
a.cc:33:28: error: 't' was not declared in this scope
   33 |             return s / x * t;
      |                            ^
a.cc: In static member function 'static void atcorder2::Program::Main(int*)':
a.cc:40:13: error: 'var' was not declared in this scope
   40 |             var sw = new StreamWriter(Console.OpenStandardOutput()) { AutoFlush = false };
      |             ^~~
a.cc:41:13: error: 'Console' was not declared in this scope
   41 |             Console.SetOut(sw);
      |             ^~~~~~~
a.cc:41:28: error: 'sw' was not declared in this scope
   41 |             Console.SetOut(sw);
      |                            ^~
a.cc:43:17: error: expected ';' before 'input'
   43 |             var input = Reads();
      |                 ^~~~~
a.cc:44:17: error: expected ';' before 'n'
   44 |             var n = input[0];
      |                 ^
a.cc:45:17: error: expected ';' before 'y'
   45 |             var y = input[1];
      |                 ^
a.cc:46:17: error: expected ';' before 'a'
   46 |             var a = y / 10000 + 1;
      |                 ^
a.cc:47:17: error: expected ';' before 'b'
   47 |             var b = y / 5000 + 1;
      |                 ^
a.cc:52:33: error: 'a' was not declared in this scope
   52 |             for (int i = 0; i < a; i++)
      |                                 ^
a.cc:54:37: error: 'b' was not declared in this scope
   54 |                 for (int j = 0; j < b; j++)
      |                                     ^
a.cc:56:26: error: 'y' was not declared in this scope
   56 |                     if ((y - 10000 * i - 5000 * j) / 1000 == n - i - j&&n-i-j>=0)
      |                          ^
a.cc:56:62: error: 'n' was not declared in this scope
   56 |                     if ((y - 10000 * i - 5000 * j) / 1000 == n - i - j&&n-i-j>=0)
      |                                                              ^