#include <bits/stdc++.h>
using namespace std;
int back1(long long num) {
  int count = 0;
  while (num % 3 == 0) num /= 3, count++;
  return count;
}
void H2A() {
  long long n, counter = 0, m;
  cin >> n >> m;
  long long arr[n + 2];
  vector<long long> cum(n);
  long long num = 0;
  for (int i = 0; i < n; i++) cin >> arr[i];
  cum[0] = arr[0];
  for (int i = 1; i < n; i++) cum[i] = arr[i] + cum[i - 1];
  while (m--) {
    cin >> num;
    vector<long long>::iterator low;
    low = lower_bound(cum.begin(), cum.end(), num);
    long long l = (low - cum.begin());
    long long x2;
    if (l != 0)
      x2 = num - cum[l - 1];
    else
      x2 = num;
    cout << l + 1 << " " << x2 << "\n";
  }
}
int main() {
  int t = 1;
  while (t--) H2A();
}
