#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long long n, m, p;
  cin >> n >> m;
  vector<unsigned long long> vec(n);
  for (auto &x : vec) cin >> x;
  for (unsigned long long i = 1; i < n; i++) vec[i] = vec[i] + vec[i - 1];
  while (m--) {
    cin >> p;
    long long res = 0;
    int s = 0, e = n - 1;
    while (s <= e) {
      int mid = s + (e - s) / 2;
      if (vec[mid] < p)
        s = mid + 1;
      else {
        res = mid;
        e = mid - 1;
      }
    }
    if (res == 0) {
      cout << res + 1 << " " << p << endl;
    } else {
      cout << res + 1 << " " << (p - vec[res - 1]) << endl;
    }
  }
  return 0;
}
