func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 1e5 + 7;   void read(long long &x) {     x = 0;     char ch = getchar();     long long pd = 1;     while (ch <  0  || ch >  9 ) {       if (ch ==  - ) {         pd = -pd;       }       ch = getchar();     }     while (ch >=  0  && ch <=  9 ) {       x = x * 10 + ch -  0 ;       ch = getchar();     }     x *= pd;   }   long long gcd(long long x, long long y) { return !x ? y : gcd(y % x, x); }   long long l, n, m, aa[10010];   long long a[N], b[N];   long long ans, lcm, x, y, bg;   long long mul(long long a, long long b, long long P) {     long long s = 0;     for (; b; b >>= 1, a = (a + a) % P)       if (b & 1) s = (s + a) % P;     return s;   }   long long exgcd(long long a, long long b, long long &x, long long &y) {     if (!b) {       x = 1, y = 0;       return a;     }     long long gd = exgcd(b, a % b, y, x);     y -= a / b * x;     return gd;   }   long long excrt() {     ans = a[1], lcm = b[1], x, y;     for (long long i = 2; i <= l; i++) {       long long B = b[i], C = (a[i] - ans % B + B) % B;       long long d = exgcd(lcm, B, x, y);       if (C % d) return -1;       B = B / d;       C = C / d;       x = (x + B) % B;       x = mul(x, C, B);       ans += x * lcm;       lcm *= B;       ans %= lcm;     }     return ans == 0 ? lcm : ans;   }   signed main() {     scanf( %lld%lld%lld , &n, &m, &l);     if (l > m) {       puts( NO );       return 0;     }     for (register long long i = 1; i <= l; ++i) {       scanf( %lld , &aa[i]);       b[i] = aa[i];     }     for (register long long i = 1; i <= l; ++i) {       a[i] = (1 - i);       while (a[i] < aa[i]) {         a[i] += aa[i];       }       a[i] %= aa[i];     }     long long yy = excrt();     if (yy == -1) {       puts( NO );       return 0;     }     if (yy + l - 1 > m) {       puts( NO );       return 0;     }     if (lcm > n) {       puts( NO );       return 0;     }     for (register long long i = 1; i <= l; ++i) {       if (gcd(lcm, yy + i - 1) != aa[i]) {         puts( NO );         return 0;       }     }     puts( YES );     return 0;   }   