#include <bits/stdc++.h>
using namespace std;
long long int binary(long long int low, long long int high, long long int *sum,
                     long long int x) {
  while ((high - low) > 1) {
    long long int mid = (low + high) / 2;
    if (x > sum[mid]) {
      low = mid;
      continue;
    } else if (x < sum[mid]) {
      high = mid;
      continue;
    } else
      return mid - 1;
  }
  return low;
}
void letters(long long int *a, long long int n, long long int *b,
             long long int m) {
  long long int i, sum[n + 1], j = 0, k = 0;
  sum[0] = 0;
  for (i = 0; i < n; i++) sum[i + 1] = sum[i] + a[i];
  for (j = 0; j < m; j++) {
    long long int s = binary(0, n, sum, b[j]);
    cout << s + 1 << " " << b[j] - sum[s] << endl;
  }
  return;
}
int main() {
  long long int n, m;
  cin >> n;
  cin >> m;
  long long int a[n], i, b[m];
  for (i = 0; i < n; i++) cin >> a[i];
  for (i = 0; i < m; i++) cin >> b[i];
  letters(a, n, b, m);
  return 0;
}
