#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
long long a[maxn];
int main() {
  vector<long long> c;
  int n, m;
  long long sum;
  c.push_back(0);
  scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) {
    scanf("%lld", &a[i]);
    if (i == 0) {
      c.push_back(a[i]);
      sum = a[i];
    } else {
      sum = sum + a[i];
      c.push_back(sum);
    }
  }
  for (int i = 0; i < m; i++) {
    long long q;
    cin >> q;
    long long t1 = lower_bound(c.begin(), c.end(), q) - c.begin();
    printf("%lld %lld\n", t1, q - c[t1 - 1]);
  }
}
