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