#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, m;
  cin >> n >> m;
  long long int sum[n + 1], b[m + 1], a[n + 1];
  vector<pair<long long int, long long int>> v;
  sum[0] = 0;
  a[0] = 0;
  for (long long int i = 1; i <= n; i++) {
    cin >> a[i];
    sum[i] = sum[i - 1] + a[i];
  }
  for (long long int i = 1; i <= m; i++) cin >> b[i];
  long long int j = 1;
  for (long long int i = 1; i <= m; i++) {
    while (true) {
      if (b[i] <= sum[j]) {
        v.push_back(make_pair(j, b[i] - sum[j - 1]));
        break;
      }
      j++;
    }
  }
  for (long long int i = 0; i < v.size(); i++)
    cout << v[i].first << " " << v[i].second << endl;
  return 0;
}
