func_code_string: #include <bits/stdc++.h>   using namespace std;   char getc() {     char c = getchar();     while ((c <  A  || c >  Z ) && (c <  a  || c >  z ) && (c <  0  || c >  9 ))       c = getchar();     return c;   }   long long gcd(long long n, long long m) { return m == 0 ? n : gcd(m, n % m); }   long long read() {     long long x = 0, f = 1;     char c = getchar();     while (c <  0  || c >  9 ) {       if (c ==  - ) f = -1;       c = getchar();     }     while (c >=  0  && c <=  9 )       x = (x << 1) + (x << 3) + (c ^ 48), c = getchar();     return x * f;   }   int n, m;   long long a[300010], b[300010];   signed main() {     n = read(), m = read();     for (int i = 1; i <= n; i++) a[i] = read();     for (int i = 1; i <= m; i++) b[i] = read();     sort(a + 1, a + n + 1);     long long u = 0;     for (int i = 2; i <= n; i++) u = gcd(u, a[i] - a[i - 1]);     for (int i = 1; i <= m; i++)       if (u % b[i] == 0) {         cout <<  YES  << endl;         cout << a[1] <<     << i;         return 0;       }     cout <<  NO ;     return 0;   }   