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

  alias bint=BigInt;
  int n; bint k; rd(n, k);
  auto w=new bint[](n), d=new bint[](n);
  foreach(i; 0..n) rd(w[i], d[i]);

  bint count(bint dist){
    bint ret=0;
    foreach(i; 0..n){
      auto rem=dist-w[i];
      if(rem<0) continue;
      ret+=(1+rem/d[i]);
    }
    return ret;
  }

  bint ng=0, ok=1_000_000_000_000_000_000; ok=ok*ok;
  while(ok-ng>1){
    auto md=(ok+ng)/2;
    count(md)<k ? ng : ok = md;
  }

  writeln(ok);
}

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));
  }
}
void wr(T...)(T x){
  import std.stdio;
  foreach(e; x) write(e, " ");
  writeln();
}