import java.util.Scanner; public class Test { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(), tmp; int[] m = new int[101]; for(int i = 0; i < n; i++){ tmp = sc.nextInt(); m[sc.nextInt()] += tmp; } for(int i = 1; i < 101; i++){ if(m[0] < m[i]){ System.out.println("NO"); return; } } System.out.println("YES"); } }