const t = require("fs").readFileSync(0, "utf-8").toString().split("\n");
const x = parseInt(t[0]);
const n = parseInt(t[1]);
let sum = 0;
for (let i = 2; i<n+2; i++) {
    let [a, b] = t[i].split(" ").map(Number);
    sum += a*b;
}
console.log(x==sum ? "Yes" : "No");