#include <bits/stdc++.h>
int search(int n, long long int a[n], long long int target) {
  int i;
  if (a[0] >= target) {
    printf("1 %lld\n", target);
    return 0;
  }
  int L = 0, R = n - 1;
  int M;
  while ((R - L) > 1) {
    if ((L + R) % 2 == 0) {
      M = (L + R) / 2;
    } else {
      M = (L + R - 1) / 2;
    }
    if (a[M] < target) {
      L = M;
    } else if (a[M] == target) {
      printf("%d %lld\n", M + 1, target - a[M - 1]);
      return 0;
    } else {
      R = M;
    }
  }
  if (target == a[L]) {
    printf("%d %lld\n", L + 1, target);
    return 0;
  } else if (target == a[R]) {
    printf("%d %lld\n", R + 1, target - a[R - 1]);
  } else {
    printf("%d %lld\n", L + 2, target - a[L]);
  }
}
int main() {
  int n, m, i;
  scanf("%d %d", &n, &m);
  long long int a[n];
  long long int b[m];
  long long int sum = 0;
  long long int tmp;
  for (i = 0; i < n; i++) {
    scanf("%lld", &tmp);
    a[i] = tmp + sum;
    sum = tmp + sum;
  }
  for (i = 0; i < m; i++) {
    scanf("%lld", &b[i]);
  }
  for (i = 0; i < m; i++) search(n, a, b[i]);
}
