/* package whatever; // don't place package name! */
import java.util.*;
class Product{
private int cost, num;
static int sum = 0;
Product(int cost, int num){
this.cost = cost;
this.num = num;
productSum();
}
private void productSum() {
sum += cost * num;
}
}
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
// your code goes here
Scanner sc
= new Scanner
(System.
in); int x = sc.nextInt();
int n = sc.nextInt();
Product[] p = new Product[n];
for(int i = 0; i < n; i++)
p[i] = new Product(sc.nextInt(), sc.nextInt());
String result
= (x
== Product.
sum) ? "Yes" : "No"; sc.close();
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwppbXBvcnQgamF2YS51dGlsLio7CgpjbGFzcyBQcm9kdWN0ewoJcHJpdmF0ZSBpbnQgY29zdCwgbnVtOwoJc3RhdGljIGludCBzdW0gPSAwOwoJCglQcm9kdWN0KGludCBjb3N0LCBpbnQgbnVtKXsKCQl0aGlzLmNvc3QgPSBjb3N0OwoJCXRoaXMubnVtID0gbnVtOwoJCXByb2R1Y3RTdW0oKTsKCX0KCQoJcHJpdmF0ZSB2b2lkIHByb2R1Y3RTdW0oKSB7CgkJc3VtICs9IGNvc3QgKiBudW07Cgl9Cn0KLyogTmFtZSBvZiB0aGUgY2xhc3MgaGFzIHRvIGJlICJNYWluIiBvbmx5IGlmIHRoZSBjbGFzcyBpcyBwdWJsaWMuICovCmNsYXNzIElkZW9uZQp7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgdGhyb3dzIGphdmEubGFuZy5FeGNlcHRpb24KCXsKCQkvLyB5b3VyIGNvZGUgZ29lcyBoZXJlCgkJU2Nhbm5lciBzYyA9IG5ldyBTY2FubmVyKFN5c3RlbS5pbik7CgkJaW50IHggPSBzYy5uZXh0SW50KCk7CgkJaW50IG4gPSBzYy5uZXh0SW50KCk7CgkJCgkJUHJvZHVjdFtdIHAgPSBuZXcgUHJvZHVjdFtuXTsKCQkKC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