#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
long long a[N], b[N];
int main() {
  long long n, m;
  cin >> n >> m;
  b[-1] = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    b[i] = b[i - 1] + a[i];
  }
  while (m--) {
    long long x;
    cin >> x;
    int id = lower_bound(b, b + n, x) - b;
    cout << id + 1 << " " << (a[id] - (b[id] - x)) << endl;
  }
  return 0;
}
