#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
int n, m, X[N], S[N], A, L;
map<int, int> I;
int get_left(int p, int l) { return *lower_bound(S, S + n, p - l); }
int get_right(int p, int l) { return *(upper_bound(S, S + n, p + l) - 1); }
int solve(int p, int l) {
  int rt = get_right(p, l);
  int lt = get_left(rt, l - rt + p);
  if (p == rt && rt == lt) return rt;
  int d = 2 * rt - p - lt;
  if (lt == p) return solve(lt, l % d);
  return solve(lt, l - d);
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> X[i];
    S[i] = X[i];
    I[X[i]] = i + 1;
  }
  sort(S, S + n);
  for (int i = 0; i < m; i++) {
    cin >> A >> L;
    A -= 1;
    int end = solve(X[A], L);
    cout << I[end] << endl;
  }
}
