#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
long long a[maxn], b[maxn];
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= n; i++) {
    scanf("%lld", &a[i]);
  }
  for (int i = 1; i <= m; i++) {
    scanf("%lld", &b[i]);
  }
  for (int i = 2; i <= n; i++) {
    a[i] += a[i - 1];
  }
  long long r = 1;
  a[0] = 0;
  for (int i = 1; i <= m; i++) {
    if (b[i] < a[r] && r <= n) {
      cout << r << " " << b[i] - a[r - 1] << endl;
    } else if (b[i] >= a[r] && r <= n) {
      while (b[i] > a[r] && r <= n) {
        ++r;
      }
      cout << r << " " << b[i] - a[r - 1] << endl;
    }
  }
  return 0;
}
