Language: C++

import java.util.*;

class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int[] t= new int[N];
		int[] x= new int[N];
		int[] y= new int[N];
		for (int i=0;i<N;i++) {
			t[i] = sc.nextInt();
			x[i] = sc.nextInt();
			y[i] = sc.nextInt();
		}

		int X=0;
		int Y=0;
		int T=0;
		int flag=0;

		for (int i=0;i<N;i++) {
			if (((Math.abs(x[i]-X)+Math.abs(y[i]-Y))<=t[0])&&((t[0]-(Math.abs(x[i]-X)+Math.abs(y[i]-Y)))%2==0)) {
				X=x[i];
				Y=y[i];
				T+=t[i];
			}else {
				flag=1;
				break;
			}
		}

		if (flag==0) {
			System.out.println("YES");
		}else if (flag==1) { 
			System.out.println("NO");
		}
	}
}

Compiler output:
a.cc:1:1: error: 'import' does not name a type
    1 | import java.util.*;
      | ^~~~~~
a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts'
a.cc:4:15: error: expected ':' before 'static'
    4 |         public static void main(String[] args) {
      |               ^~~~~~~
      |               :
a.cc:4:33: error: 'String' has not been declared
    4 |         public static void main(String[] args) {
      |                                 ^~~~~~
a.cc:4:42: error: expected ',' or '...' before 'args'
    4 |         public static void main(String[] args) {
      |                                          ^~~~
a.cc:38:2: error: expected ';' after class definition
   38 | }
      |  ^
      |  ;
a.cc: In static member function 'static void Main::main(int*)':
a.cc:5:17: error: 'Scanner' was not declared in this scope
    5 |                 Scanner sc = new Scanner(System.in);
      |                 ^~~~~~~
a.cc:6:25: error: 'sc' was not declared in this scope
    6 |                 int N = sc.nextInt();
      |                         ^~
a.cc:7:20: error: structured binding declaration cannot have type 'int'
    7 |                 int[] t= new int[N];
      |                    ^~
a.cc:7:20: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:7:20: error: empty structured binding declaration
a.cc:7:23: error: expected initializer before 't'
    7 |                 int[] t= new int[N];
      |                       ^
a.cc:8:20: error: structured binding declaration cannot have type 'int'
    8 |                 int[] x= new int[N];
      |                    ^~
a.cc:8:20: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:8:20: error: empty structured binding declaration
a.cc:8:23: error: expected initializer before 'x'
    8 |                 int[] x= new int[N];
      |                       ^
a.cc:9:20: error: structured binding declaration cannot have type 'int'
    9 |                 int[] y= new int[N];
      |                    ^~
a.cc:9:20: note: type must be cv-qualified 'auto' or reference to cv-qualified 'auto'
a.cc:9:20: error: empty structured binding declaration
a.cc:9:23: error: expected initializer before 'y'
    9 |                 int[] y= new int[N];
      |                       ^
a.cc:11:25: error: 't' was not declared in this scope
   11 |                         t[i] = sc.nextInt();
      |                         ^
a.cc:12:25: error: 'x' was not declared in this scope
   12 |                         x[i] = sc.nextInt();
      |                         ^
a.cc:13:25: error: 'y' was not declared in this scope
   13 |                         y[i] = sc.nextInt();
      |                         ^
a.cc:22:31: error: 'Math' was not declared in this scope
   22 |                         if (((Math.abs(x[i]-X)+Math.abs(y[i]-Y))<=t[0])&&((t[0]-(Math.abs(x[i]-X)+Math.abs(y[i]-Y)))%2==0)) {
      |                               ^~~~
a.cc:22:40: error: 'x' was not declared in this scope
   22 |                         if (((Math.abs(x[i]-X)+Math.abs(y[i]-Y))<=t[0])&&((t[0]-(Math.abs(x[i]-X)+Math.abs(y[i]-Y)))%2==0)) {
      |                                        ^
a.cc:22:57: error: 'y' was not declared in this scope
   22 |                         if (((Math.abs(x[i]-X)+Math.abs(y[i]-Y))<=t[0])&&((t[0]-(Math.abs(x[i]-X)+Math.abs(y[i]-Y)))%2==0)) {
      |                                                         ^
a.cc:22:67: error: 't' was not declared in this scope
   22 |                         if (((Math.abs(x[i]-X)+Math.abs(y[i]-Y))<=t[0])&&((t[0]-(Math.abs(x[i]-X)+Math.abs(y[i]-Y)))%2==0)) {
      |                                                                   ^
a.cc:33:25: error: 'System' was not declared in this scope
   33 |                         System.out.println("YES");
      |                         ^~~~~~
a.cc:35:25: error: 'System' was not declared in this scope
   35 |                         System.out.println("NO");
      |                         ^~~~~~