Language: C++

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


    class Program
    {


        static void Main(string[] args)
        {
            Solve();
        }

        static void Solve()
        {
        Scan sc = new Scan();

        var p1 = sc.longarr;
        long n = p1[0];
        var p2 = sc.longarr;
        long k = p2[0];

        n %= 500;
        if (n - k >= 0) Console.WriteLine("Yes");
        else Console.WriteLine("No");

            
        }
    }


    class Scan
    {
    public string str => Console.ReadLine();

    public string[] strarr => str.Split(' ');

    public long[] longarr => strarr.Select(long.Parse).ToArray();

   
    }


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:4:7: error: expected nested-name-specifier before 'System'
    4 | using System.Text;
      |       ^~~~~~
a.cc:5:7: error: expected nested-name-specifier before 'System'
    5 | using System.Threading.Tasks;
      |       ^~~~~~
a.cc:12:26: error: 'string' has not been declared
   12 |         static void Main(string[] args)
      |                          ^~~~~~
a.cc:12:35: error: expected ',' or '...' before 'args'
   12 |         static void Main(string[] args)
      |                                   ^~~~
a.cc:32:6: error: expected ';' after class definition
   32 |     }
      |      ^
      |      ;
a.cc: In static member function 'static void Program::Solve()':
a.cc:19:9: error: 'Scan' was not declared in this scope
   19 |         Scan sc = new Scan();
      |         ^~~~
a.cc:21:9: error: 'var' was not declared in this scope
   21 |         var p1 = sc.longarr;
      |         ^~~
a.cc:22:18: error: 'p1' was not declared in this scope
   22 |         long n = p1[0];
      |                  ^~
a.cc:23:13: error: expected ';' before 'p2'
   23 |         var p2 = sc.longarr;
      |             ^~
a.cc:24:18: error: 'p2' was not declared in this scope
   24 |         long k = p2[0];
      |                  ^~
a.cc:27:25: error: 'Console' was not declared in this scope
   27 |         if (n - k >= 0) Console.WriteLine("Yes");
      |                         ^~~~~~~
a.cc:28:14: error: 'Console' was not declared in this scope
   28 |         else Console.WriteLine("No");
      |              ^~~~~~~
a.cc: At global scope:
a.cc:37:11: error: expected ':' before 'string'
   37 |     public string str => Console.ReadLine();
      |           ^~~~~~~
      |           :
a.cc:37:12: error: 'string' does not name a type
   37 |     public string str => Console.ReadLine();
      |            ^~~~~~
a.cc:39:11: error: expected ':' before 'string'
   39 |     public string[] strarr => str.Split(' ');
      |           ^~~~~~~
      |           :
a.cc:39:12: error: 'string' does not name a type
   39 |     public string[] strarr => str.Split(' ');
      |            ^~~~~~
a.cc:41:11: error: expected ':' before 'long'
   41 |     public long[] longarr => strarr.Select(long.Parse).ToArray();
      |           ^~~~~
      |           :
a.cc:41:16: error: expected unqualified-id before '[' token
   41 |     public long[] longarr => strarr.Select(long.Parse).ToArray();
      |                ^
a.cc:44:6: error: expected ';' after class definition
   44 |     }
      |      ^
      |      ;