#include <bits/stdc++.h>
using namespace std;
void SieveOfEratosthenes(long long n) {
  bool prime[n + 1];
  memset(prime, true, sizeof(prime));
  for (long long p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (long long i = p * p; i <= n; i += p) prime[i] = false;
    }
  }
  for (long long p = 2; p <= n; p++)
    if (prime[p]) cout << p << " ";
}
long long power(long long x, unsigned long long y) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) res = res * x;
    y = y >> 1;
    x = x * x;
  }
  return res;
}
int main() {
  long long n, q;
  cin >> n >> q;
  long long arr[n];
  for (long long i = 0; i < n; i++) {
    cin >> arr[i];
  }
  long long sum = arr[0];
  for (long long i = 1; i < n; i++) {
    arr[i] += sum;
    sum = arr[i];
  }
  for (long long i = 0; i < q; i++) {
    long long a;
    cin >> a;
    long long ans1, ans2;
    ans1 = lower_bound(arr, arr + n, a) - arr;
    cout << ans1 + 1 << " ";
    if (ans1 == 0)
      cout << a << endl;
    else
      cout << a - arr[ans1 - 1] << endl;
  }
}
