#include <bits/stdc++.h>
int main(int argc, const char* argv[]) {
  int n, k;
  std::cin >> n >> k;
  std::vector<long long> cl(n);
  for (int i = 0; i < n; i++) {
    std::cin >> cl[i];
  }
  std::vector<long long> std(k);
  for (int i = 0; i < k; i++) {
    std::cin >> std[i];
  }
  for (int i = 1; i < cl.size(); i++) {
    cl[i] += cl[i - 1];
  }
  for (int i = 0; i < std.size(); i++) {
    if (std[i] <= cl[0]) {
      std::cout << 1 << " " << std[i] << "\n";
      continue;
    }
    int l = 0, r = cl.size() - 1;
    while (l < r) {
      int mid = (l + r + 1) / 2;
      if (cl[mid] < std[i]) {
        l = mid;
      } else {
        r = mid - 1;
      }
    }
    std::cout << l + 2 << " " << std[i] - cl[l] << "\n";
  }
  return 0;
}
