#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
vector<long long> a;
int main() {
  int n, m, cnt = 0;
  long long q;
  cin >> n >> m;
  a.push_back(0);
  for (int i = 1; i <= n; ++i) {
    cin >> q;
    a.push_back(a[i - 1] + q);
  }
  while (m--) {
    cin >> q;
    while (a[cnt] < q) cnt++;
    cout << cnt << ' ' << q - a[cnt - 1] << '\n';
  }
  return 0;
}
