void main(){
  import std.stdio, std.string, std.conv, std.algorithm;

  int n, m; rd(n, m);
  auto as=readln.split.to!(long[]);
  auto bs=readln.split.to!(long[]);

  auto dub=new long[](n+1);
  foreach(i; 0..n) dub[i+1]=dub[i]+as[i];
  dub~=1_000_000_000_000_000_000;
  int x=0;
  foreach(b; bs){
    while(dub[x+1]<b) x++;
    // dub[x] < b <= dub[x+1]
    writeln(x+1, " ", b-dub[x]);
  }
}

void rd(T...)(ref T x){
  import std.stdio, std.string, std.conv;
  auto l=readln.split;
  assert(l.length==x.length);
  foreach(i, ref e; x) e=l[i].to!(typeof(e));
}
