public static void main ( String [ ] args ) {
  int n = nextInt ( ) ;
  int x = 0 , y = 0 ;
  long tSum = 0 ;
  boolean F = true ;
  for ( int i = 0 ;
  i < n ;
  i ++ ) {
    long t = nextInt ( ) - tSum ;
    tSum += t ;
    int tempX = nextInt ( ) ;
    int tempY = nextInt ( ) ;
    if ( x == tempX && y == tempY ) {
      F = false ;
      break ;
    }
    int dist = calcManhatDistance ( x , y , tempX , tempY ) ;
    if ( dist > t || dist % 2 != t % 2 ) {
      F = false ;
      break ;
    }
    x = tempX ;
    y = tempY ;
  }
  System . out . println ( yesno ( F ) ) ;
}

public static void main ( String [ ] args ) { int n = nextInt ( ) ; int x = 0 , y = 0 ; long tSum = 0 ; boolean F = true ; for ( int i = 0 ; i < n ; i ++ ) { long t = nextInt ( ) - tSum ; tSum += t ; int tempX = nextInt ( ) ; int tempY = nextInt ( ) ; if ( x == tempX && y == tempY ) { F = false ; break ; } int dist = calcManhatDistance ( x , y , tempX , tempY ) ; if ( dist > t || dist % 2 != t % 2 ) { F = false ; break ; } x = tempX ; y = tempY ; } System . out . println ( yesno ( F ) ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (array_type element: (type_identifier) dimensions: (dimensions)) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (local_variable_declaration type: (boolean_type) declarator: (variable_declarator name: (identifier) value: (true))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (method_invocation name: (identifier) arguments: (argument_list)) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list)))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (identifier) right: (identifier)))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (false))) (break_statement))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (method_invocation name: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (binary_expression left: (binary_expression left: (identifier) right: (decimal_integer_literal)) right: (binary_expression left: (identifier) right: (decimal_integer_literal))))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (false))) (break_statement))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (method_invocation name: (identifier) arguments: (argument_list (identifier))))))))