#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
long long pre[maxn], tmp;
int n, m, pos;
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) cin >> pre[i], pre[i] += pre[i - 1];
  while (m--) {
    cin >> tmp;
    pos = upper_bound(pre, pre + n + 1, tmp) - pre - 1;
    pos -= tmp == pre[pos];
    cout << pos + 1 << ' ' << tmp - pre[pos] << '\n';
  }
  return 0;
}
