#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  unsigned long long int n, m, i, j = 0, b;
  cin >> n >> m;
  unsigned long long int a[n];
  for (i = 0; i < n; i++) cin >> a[i];
  for (i = 1; i < n; i++) a[i] = a[i - 1] + a[i];
  for (i = 0; i < m; i++) {
    cin >> b;
    while (b > a[j]) {
      j++;
    }
    if (j == 0)
      cout << j + 1 << " " << b << endl;
    else if (j < n)
      cout << j + 1 << " " << b - a[j - 1] << endl;
    else if (j == n)
      cout << j << " " << b - a[j - 2] << endl;
  }
  return 0;
}
