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;
#pragma GCC optimize("O3")
template <class c>
struct rge {
  c b, e;
};
template <class c>
rge<c> range(c h, c n) {
  return {h, n};
}
template <class c>
auto dud(c* r) -> decltype(cerr << *r);
template <class c>
char dud(...);
struct muu {
  template <class c>
  muu& operator<<(const c&) {
    return *this;
  }
  muu& operator()() { return *this; }
};
constexpr int32_t fx[4][2] = {{0, 1}, {0, -1}, {1, 1}, {1, -1}};
constexpr int32_t fxx[8][2] = {{0, 1}, {0, -1}, {1, 0},  {-1, 0},
                               {1, 1}, {1, -1}, {-1, 1}, {-1, -1}};
using ll = int64_t;
using ull = uint64_t;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using vi = vector<int>;
using vii = vector<pii>;
using vll = vector<ll>;
constexpr int32_t INF = int32_t(2e9);
constexpr int64_t LLINF = (int64_t)1e15;
constexpr int64_t MOD = (int64_t)1e9 + 7;
const uint32_t MAX_SEGMENT_ENDING = int32_t(1e5 + 1);
const uint32_t SEG_TREE_HEIGHT = (uint32_t)floor(log2(MAX_SEGMENT_ENDING)) + 1u;
const uint32_t SEG_TREE_SIZE = 1u << SEG_TREE_HEIGHT;
const uint32_t FIRST_LEAF = SEG_TREE_SIZE >> 1u;
template <typename ForwardIterator, typename T>
ForwardIterator largest_less_than_or_equal_to(ForwardIterator first,
                                              ForwardIterator last,
                                              const T& val) {
  ForwardIterator it = upper_bound(first, last, val);
  if (it == first) return nullptr;
  return --it;
}
template <typename T>
void minn(T& a, T b) {
  if (a > b) a = b;
}
template <typename T>
void maxx(T& a, T b) {
  if (a < b) a = b;
}
struct FindUnion {
  vector<int> rep;
  vector<int> rankk;
  FindUnion(int n) {
    rep.resize(n + 1);
    rankk.resize(n + 1);
    for (int i = 0; i <= n; i++) init(i);
  }
  void init(int x) {
    rep[x] = x;
    rankk[x] = 0;
  }
  int find(int x) {
    if (rep[x] != x) rep[x] = find(rep[x]);
    return rep[x];
  }
  void unia(int x, int y) {
    int rx = find(x);
    int ry = find(y);
    if (rankk[rx] > rankk[ry]) {
      rep[ry] = rx;
    } else {
      rep[rx] = ry;
      if (rankk[ry] == rankk[rx]) rankk[ry]++;
    }
  }
};
struct HashDS {
  const int64_t p1 = 31;
  const int64_t p2 = 53;
  const int64_t MOD = int64_t(1e9 + 7);
  size_t string_max_len = 0;
  bool double_hashing;
  vector<int32_t> p1_powers;
  vector<int32_t> p2_powers;
  HashDS() = default;
  HashDS(size_t _string_max_len, bool _double_hashing = false) {
    double_hashing = _double_hashing;
    string_max_len = _string_max_len;
    p1_powers.resize(string_max_len);
    if (double_hashing) p2_powers.resize(string_max_len);
    generate_powers();
  }
  void resize(int32_t n, bool _double_hashing = false) {
    double_hashing = _double_hashing;
    string_max_len = n;
    p1_powers.resize(string_max_len);
    if (double_hashing) p2_powers.resize(string_max_len);
    generate_powers();
  }
  void generate_powers() {
    p1_powers[0] = 1;
    for (int i = 1; i < string_max_len; i++)
      p1_powers[i] = int64_t(p1_powers[i - 1]) * p1 % MOD;
    if (double_hashing) {
      p2_powers[0] = 1;
      for (int i = 1; i < string_max_len; i++)
        p2_powers[i] = int64_t(p2_powers[i - 1]) * p2 % MOD;
    }
  }
  static int map_character(char c) {
    return isupper(c) ? c - 'A' + 26 + 1 : c - 'a' + 1;
  }
  int32_t hash(const string& str, int32_t a = 0, int32_t b = -1) {
    int64_t hash_val = 0;
    int step = 0;
    if (b == -1) b = str.length() - 1;
    for (int i = a; i <= b; i++)
      hash_val =
          (hash_val + (map_character(str[i])) * int64_t(p1_powers[step++])) %
          MOD;
    return hash_val;
  }
  int32_t hash2(const string& str, int32_t a = 0, int32_t b = -1) {
    int64_t hash_val = 0;
    int step = 0;
    if (b == -1) b = str.length();
    for (int i = a; i <= b; i++)
      hash_val =
          (hash_val + (map_character(str[i])) * int64_t(p2_powers[step++])) %
          MOD;
    return hash_val;
  }
  pair<int32_t, int32_t> double_hash(const string& str) {
    return {hash(str), hash2(str)};
  }
  vector<int32_t> generate_prefix_hashes(const string& str) {
    vector<int32_t> pref_hash = vector<int32_t>(str.length() + 1, 0);
    for (int i = 0; i < str.length(); i++)
      pref_hash[i + 1] =
          (int64_t(pref_hash[i]) +
           int64_t(map_character(str[i])) * int64_t(p1_powers[i])) %
          MOD;
    return pref_hash;
  }
  int32_t substring_hash(const string& s, vector<int32_t>& pref_hash, int32_t i,
                         int32_t j) {
    return ((int64_t(((pref_hash[j + 1] - pref_hash[i] % MOD) + MOD) % MOD) *
             int64_t(p1_powers[s.length() - i - 1]) % MOD) +
            MOD) %
           MOD;
  }
  int64_t count_unique_substrings(const string& s, vector<int32_t>& pref_hash) {
    int64_t res = 0;
    for (int l = 1; l <= s.length(); l++) {
      set<int32_t> hashes;
      for (int i = 0; i + l <= s.length(); i++)
        hashes.insert(((((pref_hash[i + l] - pref_hash[i] % MOD) + MOD) % MOD *
                        p1_powers[s.length() - i - 1] % MOD) +
                       MOD) %
                      MOD);
      res += hashes.size();
    }
    return res;
  }
};
bool binsearch_test() {}
int binsearch(int poc, int kon) {
  int best = -1, mid;
  while (poc <= kon) {
    mid = (poc + kon) >> 1u;
    if (binsearch_test()) {
      best = mid;
      poc = mid + 1;
    } else {
      kon = mid - 1;
    }
  }
  return best;
}
constexpr int32_t MAXN = int32_t(3e5 + 5);
int n, m;
ll arr[MAXN];
ll parr[MAXN];
ll start;
void init() {}
void input() {
  cin >> n >> m;
  for (int i = 0; i < n; ++i) cin >> arr[i];
  for (int i = 0; i < m; ++i) cin >> parr[i];
  start = arr[0];
}
ll nwd(ll a, ll b) {
  ll tmp;
  while (b > 0) {
    tmp = b;
    b = a % b;
    a = tmp;
  }
  return a;
}
void solve() {
  for (int i = n - 1; i > 0; i--) arr[i] = arr[i] - arr[i - 1];
  arr[0] = 0;
  (muu() << __FUNCTION__ << "#" << 267 << ": ") << "["
                                                   "arr"
                                                   ": "
                                                << (arr) << "] ";
  ll nwwd = arr[0];
  for (int i = 1; i < n; ++i) {
    nwwd = nwd(arr[i], nwwd);
  }
  (muu() << __FUNCTION__ << "#" << 270 << ": ") << nwwd;
  for (int i = 0; i < m; ++i) {
    if (nwwd % parr[i] == 0) {
      cout << "YES\n";
      cout << start << " " << i + 1 << endl;
      exit(0);
    }
  }
  cout << "NO\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  init();
  input();
  solve();
  return 0;
}