I hope it is ok to be pasting the code as it is the very first problem.
import java.util.*;
public class Ladders1{
public static void main(){
Scanner sc = new Scanner(System.in).useDelimiter("\n");
int t = sc.nextInt();
int a=0,b=0,c=0;
for(int i=0;i<t;i++){
String cords = sc.next();
String[] xyz = cords.split(" ",0);
a+=Integer.parseInt(xyz[0]);
b+=Integer.parseInt(xyz[1]);
c+=Integer.parseInt(xyz[2]);
}
if(a==0 && b==0 && c==0){
System.out.println("YES");
} else{
System.out.println("NO");
}
}
}
Would really appreciate your input as I've been trying to find the issue to no avail.