#include <bits/stdc++.h>
using namespace std;
int ABS(int a) { return max(a, -a); }
long long ABS(long long a) { return max(a, -a); }
double ABS(double a) { return max(a, -a); }
const int N = 2e5 + 5;
long long a[N], sum[N];
void solve() {
  int n, m;
  cin >> n >> m;
  sum[0] = 0LL;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    sum[i] = sum[i - 1] + a[i];
  }
  while (m--) {
    long long x;
    cin >> x;
    int id = lower_bound(sum + 1, sum + 1 + n, x) - sum;
    if (sum[id] == x) {
      cout << id << " " << a[id] << "\n";
      continue;
    }
    if (id == 1) {
      cout << id << " " << x << "\n";
      continue;
    }
    long long r = x - sum[id - 1];
    cout << id << " " << r << "\n";
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) solve();
}
