Problem: Ivan is going to sleep now and wants to set his alarm clock. There will be many necessary events tomorrow, the i-th of them will start during the x_i-th minute. Ivan doesn't want to skip any of the events, so he has to set his alarm clock in such a way that it rings during minutes x_1, x_2, ..., x_n, so he will be awake during each of these minutes (note that it does not matter if his alarm clock will ring during any other minute).

Ivan can choose two properties for the alarm clock — the first minute it will ring (let's denote it as y) and the interval between two consecutive signals (let's denote it by p). After the clock is set, it will ring during minutes y, y + p, y + 2p, y + 3p and so on.

Ivan can choose any minute as the first one, but he cannot choose any arbitrary value of p. He has to pick it among the given values p_1, p_2, ..., p_m (his phone does not support any other options for this setting).

So Ivan has to choose the first minute y when the alarm clock should start ringing and the interval between two consecutive signals p_j in such a way that it will ring during all given minutes x_1, x_2, ..., x_n (and it does not matter if his alarm clock will ring in any other minutes).

Your task is to tell the first minute y and the index j such that if Ivan sets his alarm clock with properties y and p_j it will ring during all given minutes x_1, x_2, ..., x_n or say that it is impossible to choose such values of the given properties. If there are multiple answers, you can print any.

Input

The first line of the input contains two integers n and m (2 ≤ n ≤ 3 ⋅ 10^5, 1 ≤ m ≤ 3 ⋅ 10^5) — the number of events and the number of possible settings for the interval between signals.

The second line of the input contains n integers x_1, x_2, ..., x_n (1 ≤ x_i ≤ 10^{18}), where x_i is the minute when i-th event starts. It is guaranteed that all x_i are given in increasing order (i. e. the condition x_1 < x_2 < ... < x_n holds).

The third line of the input contains m integers p_1, p_2, ..., p_m (1 ≤ p_j ≤ 10^{18}), where p_j is the j-th option for the interval between two consecutive signals.

Output

If it's impossible to choose such values y and j so all constraints are satisfied, print "NO" in the first line.

Otherwise print "YES" in the first line. Then print two integers y (1 ≤ y ≤ 10^{18}) and j (1 ≤ j ≤ m) in the second line, where y is the first minute Ivan's alarm clock should start ringing and j is the index of the option for the interval between two consecutive signals (options are numbered from 1 to m in the order they are given input). These values should be chosen in such a way that the alarm clock will ring during all given minutes x_1, x_2, ..., x_n. If there are multiple answers, you can print any.

Examples

Input


3 5
3 12 18
2 6 5 3 3


Output


YES
3 4


Input


4 2
1 5 17 19
4 5


Output


NO


Input


4 2
1 5 17 19
2 1


Output


YES
1 1

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using db = double;
using str = string;
using pi = pair<int, int>;
using pl = pair<ll, ll>;
using pd = pair<db, db>;
using pld = pair<ld, ld>;
using vi = vector<int>;
using vd = vector<db>;
using vld = vector<ld>;
using vl = vector<ll>;
using vs = vector<str>;
using vc = vector<char>;
using vpi = vector<pi>;
using vpl = vector<pl>;
using vpd = vector<pd>;
using vvi = vector<vi>;
using vvl = vector<vl>;
using vvc = vector<vc>;
const int MX = 2e5 + 5;
const long long INF = 1e18;
const long long MOD = 998244353;
const long double PI = acos((ld)-1);
const long double EPS = 1e-18;
template <class A>
void re(complex<A>& c);
template <class A, class B>
void re(pair<A, B>& p);
template <class A>
void re(vector<A>& v);
template <class A, size_t SZ>
void re(array<A, SZ>& a);
template <class T>
void re(T& x) {
  cin >> x;
}
void re(db& d) {
  string t;
  re(t);
  d = stod(t);
}
void re(ld& d) {
  string t;
  re(t);
  d = stold(t);
}
template <class H, class... T>
void re(H& h, T&... t) {
  re(h);
  re(t...);
}
template <class A>
void re(complex<A>& c) {
  A a, b;
  re(a, b);
  c = {a, b};
}
template <class A, class B>
void re(pair<A, B>& p) {
  re(p.first, p.second);
}
template <class A>
void re(vector<A>& x) {
  for (auto& i : x) re(i);
}
template <class A, size_t SZ>
void re(array<A, SZ>& x) {
  for (auto& i : x) re(i);
}
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll rand(ll a, ll b) { return uniform_int_distribution<ll>(a, b)(rng); }
string to_string(char c) { return string(1, c); }
string to_string(bool b) { return b ? "true" : "false"; }
string to_string(const char* second) { return (string)second; }
string to_string(string second) { return second; }
template <class A>
string to_string(complex<A> c) {
  stringstream ss;
  ss << c;
  return ss.str();
}
string to_string(vector<bool> v) {
  string res = "{";
  for (int i = 0; i < ((int)(v).size()); i++) {
    res += char('0' + v[i]);
  }
  res += "}";
  return res;
}
template <size_t SZ>
string to_string(bitset<SZ> b) {
  string res = "";
  for (int i = 0; i < SZ; i++) {
    res += char('0' + b[i]);
  }
  return res;
}
template <class A, class B>
string to_string(pair<A, B> p) {
  return "(" + to_string(p.first) + ", " + to_string(p.second) + ")";
}
template <class T>
string to_string(T v) {
  bool fst = 1;
  string res = "{";
  for (const auto& x : v) {
    if (!fst) {
      res += ", ";
    }
    fst = 0;
    res += to_string(x);
  }
  res += "}";
  return res;
}
void DBG() { cerr << "]" << endl; }
template <class H, class... T>
void DBG(H h, T... t) {
  cerr << to_string(h);
  if (sizeof...(t)) {
    cerr << ", ";
  }
  DBG(t...);
}
void EDBG(string names) { names = names; }
template <class H, class... T>
void EDBG(string names, H h, T... t) {
  auto pos = names.find(',');
  auto first_name = names.substr(0, pos);
  auto rest = names.substr(pos + 1);
  while (rest.front() == ' ') {
    rest = rest.substr(1);
  }
  cerr << "[" << first_name << "]: [" << to_string(h) << "]"
       << "\n";
  EDBG(rest, t...);
}
void pr() {}
template <class H, class... T>
void pr(const H& a, const T&... b) {
  cout << a;
  pr(b...);
}
void ps() { cout << "\n"; }
template <class H, class... T>
void ps(const H& a, const T&... b) {
  pr(a, ' ');
  ps(b...);
}
void setIn(string second) { freopen(second.c_str(), "r", stdin); }
void setOut(string second) { freopen(second.c_str(), "w", stdout); }
void unsyncIO() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(20);
}
void setIO(string second = "") {
  unsyncIO();
  if (((int)(second).size())) {
    setIn(second + ".in");
    setOut(second + ".out");
  }
}
template <class T>
void uni(vector<T>& v) {
  sort(begin(v), end(v));
  v.erase(unique(begin(v), end(v)), end(v));
}
ll cdiv(ll a, ll b) { return a / b + ((a ^ b) > 0 && a % b); }
ll fdiv(ll a, ll b) { return a / b + ((a ^ b) < 0 && a % b); }
bool even(ll a) { return !(a & 1); }
bool odd(ll a) { return (a & 1); }
ll ggcd(ll a, ll b) {
  if (!a || !b) {
    return a | b;
  }
  ll shift = __builtin_ctz(a | b);
  do {
    b >>= __builtin_ctz(b);
    if (a > b) {
      swap(a, b);
    }
    b -= a;
  } while (b);
  return a << shift;
}
ll gld(ll a, ll b) { return (a - (a % b)); }
ll llcm(ll a, ll b) { return (a / (ggcd(a, b)) * b); }
ll power(ll a, ll b, ll c) {
  ll res = 1;
  a %= c;
  while (b > 0) {
    if (odd(b)) res = res * a % c;
    a = a * a % c;
    b >>= 1;
  }
  return res;
}
ll power(ll a, ll b) {
  ll res = 1;
  while (b > 0) {
    if (odd(b)) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
bool prime(ll a) {
  if (a < 2) {
    return false;
  }
  if (a <= 3) {
    return true;
  }
  if (a % 2 == 0 || a % 3 == 0 || (a % 5 == 0 && a != 5) ||
      (a % 7 == 0 && a != 7) || (a % 11 == 0 && a != 11) ||
      (a % 13 == 0 && a != 13) || (a % 17 == 0 && a != 17) ||
      (a % 23 == 0 && a != 23) || (a % 29 == 0 && a != 29) ||
      (a % 31 == 0 && a != 31) || (a % 37 == 0 && a != 37) ||
      (a % 41 == 0 && a != 41) || (a % 43 == 0 && a != 43) ||
      (a % 47 == 0 && a != 47) || (a % 53 == 0 && a != 53) ||
      (a % 59 == 0 && a != 59) || (a % 61 == 0 && a != 61) ||
      (a % 67 == 0 && a != 67) || (a % 67 == 0 && a != 67)) {
    return false;
  }
  if ((a % 71 == 0 && a != 71) || (a % 73 == 0 && a != 73) ||
      (a % 79 == 0 && a != 79) || (a % 83 == 0 && a != 83) ||
      (a % 89 == 0 && a != 89) || (a % 97 == 0 && a != 97)) {
    return false;
  }
  if ((a % 101 == 0 && a != 101) || (a % 103 == 0 && a != 103) ||
      (a % 107 == 0 && a != 107) || (a % 109 == 0 && a != 109) ||
      (a % 113 == 0 && a != 113) || (a % 127 == 0 && a != 127) ||
      (a % 131 == 0 && a != 131) || (a % 139 == 0 && a != 139) ||
      (a % 149 == 0 && a != 149) || (a % 151 == 0 && a != 151) ||
      (a % 157 == 0 && a != 157) || (a % 163 == 0 && a != 163) ||
      (a % 167 == 0 && a != 167) || (a % 173 == 0 && a != 173) ||
      (a % 179 == 0 && a != 179) || (a % 181 == 0 && a != 181) ||
      (a % 191 == 0 && a != 191)) {
    return false;
  }
  if ((a % 193 == 0 && a != 193) || (a % 197 == 0 && a != 197) ||
      (a % 199 == 0 && a != 199)) {
    return false;
  }
  for (ll i = 5; i * i <= a; i += 6) {
    if (a % i == 0 || a % (i + 2) == 0) {
      return false;
    }
  }
  return true;
}
int n, m;
ll sum;
vl a, b;
int main() {
  setIO();
  re(n, m);
  a.resize(n);
  b.resize(m);
  re(a, b);
  for (int i = 1; i < n; i++) {
    if (i == 1) {
      sum = a[i] - a[i - 1];
    } else {
      sum = ggcd(a[i] - a[i - 1], sum);
    }
  }
  42;
  for (int i = 0; i < m; ++i) {
    if (sum % b[i] == 0) {
      ps("YES");
      ps(a[0], i + 1);
      return 0;
    }
  }
  ps("NO");
}