#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e6 + 3;
const int OO = 1e9 + 5;
int main(int argc, char* argv[]) {
  ios::sync_with_stdio(0);
  int n, q;
  vector<int> x;
  cin >> n >> q;
  x.assign(n, 0);
  for (int(i) = (0); (i) < (n); (i)++) {
    cin >> x[i];
  }
  set<int> all;
  map<int, int> where;
  for (int(i) = (0); (i) < (n); (i)++) all.insert(x[i]);
  for (int(i) = (0); (i) < (n); (i)++) where[x[i]] = i;
  for (int(Q) = (0); (Q) < (q); (Q)++) {
    int a, l;
    cin >> a >> l;
    int lNow = l;
    int dir = 1;
    int xNow = x[a - 1];
    int xPrev = OO;
    int xPrevPrev = OO;
    for (bool first = true;;) {
      if (xPrev == xPrevPrev && xNow == xPrev) {
        break;
      }
      if (first)
        first = false;
      else {
        xPrevPrev = xPrev;
        xPrev = xNow;
      }
      if (dir == 1) {
        int want = xNow + lNow;
        auto it = all.upper_bound(want);
        if (it == all.begin()) {
          dir = -dir;
          continue;
        }
        int xNxt = *prev(it);
        if (xNxt <= xNow) {
          dir = -dir;
          continue;
        }
        int len = xNxt - xNow;
        if (len > lNow) {
          dir = -dir;
          continue;
        }
        if (xNxt == xPrev) {
          break;
        }
        xNow = xNxt;
        lNow -= len;
        dir = -dir;
      } else {
        int want = xNow - lNow;
        auto it = all.lower_bound(want);
        if (it == all.end()) {
          dir = -dir;
          continue;
        }
        int xNxt = *it;
        if (xNxt >= xNow) {
          dir = -dir;
          continue;
        }
        int len = xNow - xNxt;
        if (len > lNow) {
          dir = -dir;
          continue;
        }
        if (xNxt == xPrev) {
          break;
        }
        xNow = xNxt;
        lNow -= len;
        dir = -dir;
      }
      if (xPrevPrev == xNow) {
        int dist = abs(xPrev - xNow);
        int count = lNow / dist;
        lNow = lNow - count * dist;
        if (count % 2 == 1) {
          dir = -dir;
          int tmp = xNow;
          xPrevPrev = xPrev;
          xNow = xPrev;
          xPrev = tmp;
        }
      }
    }
    cout << where[xNow] + 1 << endl;
  }
  return 0;
}
