Here's your approach:
Define a struct with three integer fields: x, y, z.
Create a sum variable of this struct type, initialized to (0, 0, 0).
Read , the number of forces.
Loop times. For each iteration, read three integers representing a force. Add each component to the corresponding field in sum.
After the loop, check if sum.x == 0 && sum.y == 0 && sum.z == 0. If true, print YES. Otherwise, print NO. The struct makes this clean. You could use three separate variables, but bundling them shows they're related. This pattern scales to more complex data.