(입출력 요구사항)
int X = scan.nextInt(); // 총 금액
int N = scan.nextInt(); // 물건의 개수
import java.util.Scanner;
public class Main{
public void solve(){
Scanner scan= new Scanner(System.in);
int X = scan.nextInt(); // 총 금액
int N = scan.nextInt(); // 물건의 개수
int sum=0;
for(int i=0; i<N; i++){
int a = scan.nextInt();
int b = scan.nextInt();
sum= sum+ a*b;
}
if(sum==X)
System.out.println("Yes");
else
System.out.println("No");
}
public static void main(String[]args) {
new Main().solve();
}
}