import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int[] x1 = new int[n]; int[] y1 = new int[n]; int soma = 0; int somay = 0; for(int a0 = 0; a0 < n; a0++){ int x = in.nextInt(); int y = in.nextInt(); x1[a0] = x; y1[a0] = y; soma = soma + x; somay = somay + y; } if(soma == 0 || somay == 0) System.out.print("YES"); else System.out.print("NO"); } }