#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const int N = 2e5 + 5;
long long int a[N];
int main() {
  clock_t duration;
  duration = clock();
  int n, m;
  cin >> n >> m;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    if (i) a[i] += a[i - 1];
  }
  vector<long long> b(m);
  for (int i = 0; i < m; i++) {
    long long int x;
    cin >> x;
    x--;
    auto it = upper_bound(a, a + n + 1, x);
    --it;
    cout << (it - a) + 1 << " " << x - *it + 1 << "\n";
  }
  duration = clock() - duration;
  double time_taken = ((double)duration) / CLOCKS_PER_SEC;
  return 0;
}
