#include <bits/stdc++.h>
using namespace std;
const int maxn = 200050;
long long a[maxn];
long long num[maxn];
int main() {
  long long n, m;
  scanf("%lld%lld", &n, &m);
  num[0] = 0;
  for (long long i = 1; i <= n; i++) {
    long long t;
    scanf("%lld", &t);
    num[i] = num[i - 1] + t;
  }
  while (m--) {
    long long t;
    scanf("%lld", &t);
    int pos = lower_bound(num, num + n + 1, t) - num;
    while (num[pos] >= t) pos--;
    cout << pos + 1 << ' ' << t - num[pos] << endl;
  }
  return 0;
}
