#include <bits/stdc++.h>
using namespace std;
long long add(long long a, long long b, long long m = 1000000007) {
  long long ret = a + b;
  if (ret >= m) ret -= m;
  return ret;
}
long long subtract(long long a, long long b, long long m = 1000000007) {
  long long ret = a - b;
  if (ret < 0) ret += m;
  return ret;
}
long long mult(long long a, long long b, long long m = 1000000007) {
  long long ret = a * b;
  if (ret >= m) ret %= m;
  return ret;
}
long long bigmod(long long a, long long b, long long m = 1000000007) {
  long long ret = 1;
  while (b) {
    if (b & 1) ret = mult(ret, a, m);
    b >>= 1;
    a = mult(a, a, m);
  }
  return ret;
}
long long inverse(long long n, long long m = 1000000007) {
  return bigmod(n, 1000000007 - 2, m);
}
const long long lim = 1e16 + 1;
const int N = 2e5 + 10;
bool cmpA;
struct Line {
  long long a;
  long double b;
  mutable long double xl;
  bool operator<(const Line &l) const {
    if (cmpA)
      return a < l.a;
    else
      return xl < l.xl;
  }
};
struct Hull : multiset<Line> {
  iterator next(iterator y) {
    advance(y, 1);
    return y;
  }
  iterator prev(iterator y) {
    advance(y, -1);
    return y;
  }
  bool bad(iterator y) {
    iterator z = next(y), x;
    if (y == begin()) {
      if (z == end()) return 0;
      return y->a == z->a && y->b <= z->b;
    }
    x = prev(y);
    if (z == end()) return y->a == x->a && y->b <= x->b;
    return 1.0L * (x->b - y->b) * (z->a - y->a) >=
           1.0L * (y->b - z->b) * (y->a - x->a);
  }
  void add_line(long long a, long double b) {
    cmpA = 1;
    iterator y = insert((Line){a, b, -0x3f3f3f3f3f3f3f3fLL});
    if (bad(y)) {
      erase(y);
      return;
    }
    while (next(y) != end() && bad(next(y))) erase(next(y));
    while (y != begin() && bad(prev(y))) erase(prev(y));
    if (next(y) != end())
      next(y)->xl = 1.0L * (y->b - next(y)->b) / (next(y)->a - y->a);
    if (y != begin()) y->xl = 1.0L * (y->b - prev(y)->b) / (prev(y)->a - y->a);
  }
  long double query(long long x) {
    if (empty()) return 0;
    cmpA = 0;
    iterator it = prev(lower_bound((Line){0, 0, 1.0L * x}));
    long double r = it->a;
    r *= x;
    return r + it->b;
  }
} hull;
long long find_time(long long x) {
  long long l = 0, h = x, ret = -1;
  while (l <= h) {
    long long m = (l + h) / 2;
    if (hull.query(m) >= x)
      ret = m, h = m - 1;
    else
      l = m + 1;
  }
  return ret;
}
pair<long long, long long> a[200010];
int main() {
  long long n, s;
  long long x, y;
  while (scanf("%lld%lld", &n, &s) == 2) {
    long long mx = 0;
    for (int i = 0, _i = (n); i < _i; ++i) {
      scanf("%lld%lld", &x, &y);
      a[i] = {x, y};
      if (y == 0) mx = max(mx, x);
    }
    sort(a, a + n);
    hull.add_line(mx, 0);
    for (int i = 0, _i = (n); i < _i; ++i) {
      if (a[i].first < mx) continue;
      if (a[i].second == 0) continue;
      if (i && a[i].first == a[i - 1].first) continue;
      long long tim = find_time(a[i].second);
      hull.add_line(a[i].first,
                    hull.query(tim) - a[i].second - tim * a[i].first);
    }
    printf("%lld\n", find_time(s));
  }
  return 0;
}

### Prompt

In cpp, your task is to solve the following problem:

Kostya is playing the computer game Cookie Clicker. The goal of this game is to gather cookies. You can get cookies using different buildings: you can just click a special field on the screen and get the cookies for the clicks, you can buy a cookie factory, an alchemy lab, a time machine and it all will bring lots and lots of cookies.

At the beginning of the game (time 0), Kostya has 0 cookies and no buildings. He has n available buildings to choose from: the i-th building is worth ci cookies and when it's built it brings vi cookies at the end of each second. Also, to make the game more interesting to play, Kostya decided to add a limit: at each moment of time, he can use only one building. Of course, he can change the active building each second at his discretion.

It's important that Kostya is playing a version of the game where he can buy new buildings and change active building only at time moments that are multiples of one second. Kostya can buy new building and use it at the same time. If Kostya starts to use a building at the time moment t, he can get the first profit from it only at the time moment t + 1.

Kostya wants to earn at least s cookies as quickly as possible. Determine the number of seconds he needs to do that.

Input

The first line contains two integers n and s (1 ≤ n ≤ 2·105, 1 ≤ s ≤ 1016) — the number of buildings in the game and the number of cookies Kostya wants to earn.

Each of the next n lines contains two integers vi and ci (1 ≤ vi ≤ 108, 0 ≤ ci ≤ 108) — the number of cookies the i-th building brings per second and the building's price.

Output

Output the only integer — the minimum number of seconds Kostya needs to earn at least s cookies. It is guaranteed that he can do it.

Examples

Input

3 9
1 0
2 3
5 4


Output

6


Input

3 6
1 0
2 2
5 4


Output

5


Input

3 13
1 0
2 2
6 5


Output

7


Input

1 10000000000000000
1 0


Output

10000000000000000

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
long long add(long long a, long long b, long long m = 1000000007) {
  long long ret = a + b;
  if (ret >= m) ret -= m;
  return ret;
}
long long subtract(long long a, long long b, long long m = 1000000007) {
  long long ret = a - b;
  if (ret < 0) ret += m;
  return ret;
}
long long mult(long long a, long long b, long long m = 1000000007) {
  long long ret = a * b;
  if (ret >= m) ret %= m;
  return ret;
}
long long bigmod(long long a, long long b, long long m = 1000000007) {
  long long ret = 1;
  while (b) {
    if (b & 1) ret = mult(ret, a, m);
    b >>= 1;
    a = mult(a, a, m);
  }
  return ret;
}
long long inverse(long long n, long long m = 1000000007) {
  return bigmod(n, 1000000007 - 2, m);
}
const long long lim = 1e16 + 1;
const int N = 2e5 + 10;
bool cmpA;
struct Line {
  long long a;
  long double b;
  mutable long double xl;
  bool operator<(const Line &l) const {
    if (cmpA)
      return a < l.a;
    else
      return xl < l.xl;
  }
};
struct Hull : multiset<Line> {
  iterator next(iterator y) {
    advance(y, 1);
    return y;
  }
  iterator prev(iterator y) {
    advance(y, -1);
    return y;
  }
  bool bad(iterator y) {
    iterator z = next(y), x;
    if (y == begin()) {
      if (z == end()) return 0;
      return y->a == z->a && y->b <= z->b;
    }
    x = prev(y);
    if (z == end()) return y->a == x->a && y->b <= x->b;
    return 1.0L * (x->b - y->b) * (z->a - y->a) >=
           1.0L * (y->b - z->b) * (y->a - x->a);
  }
  void add_line(long long a, long double b) {
    cmpA = 1;
    iterator y = insert((Line){a, b, -0x3f3f3f3f3f3f3f3fLL});
    if (bad(y)) {
      erase(y);
      return;
    }
    while (next(y) != end() && bad(next(y))) erase(next(y));
    while (y != begin() && bad(prev(y))) erase(prev(y));
    if (next(y) != end())
      next(y)->xl = 1.0L * (y->b - next(y)->b) / (next(y)->a - y->a);
    if (y != begin()) y->xl = 1.0L * (y->b - prev(y)->b) / (prev(y)->a - y->a);
  }
  long double query(long long x) {
    if (empty()) return 0;
    cmpA = 0;
    iterator it = prev(lower_bound((Line){0, 0, 1.0L * x}));
    long double r = it->a;
    r *= x;
    return r + it->b;
  }
} hull;
long long find_time(long long x) {
  long long l = 0, h = x, ret = -1;
  while (l <= h) {
    long long m = (l + h) / 2;
    if (hull.query(m) >= x)
      ret = m, h = m - 1;
    else
      l = m + 1;
  }
  return ret;
}
pair<long long, long long> a[200010];
int main() {
  long long n, s;
  long long x, y;
  while (scanf("%lld%lld", &n, &s) == 2) {
    long long mx = 0;
    for (int i = 0, _i = (n); i < _i; ++i) {
      scanf("%lld%lld", &x, &y);
      a[i] = {x, y};
      if (y == 0) mx = max(mx, x);
    }
    sort(a, a + n);
    hull.add_line(mx, 0);
    for (int i = 0, _i = (n); i < _i; ++i) {
      if (a[i].first < mx) continue;
      if (a[i].second == 0) continue;
      if (i && a[i].first == a[i - 1].first) continue;
      long long tim = find_time(a[i].second);
      hull.add_line(a[i].first,
                    hull.query(tim) - a[i].second - tim * a[i].first);
    }
    printf("%lld\n", find_time(s));
  }
  return 0;
}

```