#include <bits/stdc++.h>
using namespace std;
int break_point() {
  char c;
  while ((c = getchar()) != '\n')
    ;
  return 0;
}
template <typename T>
void read_integer(T &r) {
  bool sign = 0;
  r = 0;
  char c;
  while (1) {
    c = getchar();
    if (c == '-') {
      sign = 1;
      break;
    }
    if (c != ' ' && c != '\n') {
      r = c - '0';
      break;
    }
  }
  while (1) {
    c = getchar();
    if (c == ' ' || c == '\n') break;
    r = r * 10 + (c - '0');
  }
  if (sign) r = -r;
}
long long binpow(long long a, long long b) {
  long long ret = 1;
  while (b) {
    if (b & 1) ret = ret * a;
    a *= a;
    b >>= 1;
  }
  return ret;
}
long long binpow(long long a, long long b, int mod) {
  long long ret = 1;
  while (b) {
    if (b & 1) ret = (ret * a) % mod;
    a = (a * a) % mod;
    b >>= 1;
  }
  return ret;
}
inline int getbit(int x, int b) { return (x >> b) & 1; }
inline int setbit(int x, int b) { return x | (1 << b); }
inline void _setbit(int &x, int b) { x = setbit(x, b); }
inline long long setbit(long long x, int b) { return x | (1ll << b); }
inline void _setbit(long long &x, int b) { x = setbit(x, b); }
inline int unsetbit(int x, int b) { return x & (INT_MAX - (1 << b)); }
inline void _unsetbit(int &x, int b) { x = unsetbit(x, b); }
inline int countbit(int x) {
  x = x - ((x >> 1) & 0x55555555);
  x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
  return ((x + (x >> 4) & 0xF0F0F0F) * 0x1010101) >> 24;
}
inline long long countbit(long long x) {
  return countbit(int(x & INT_MAX)) + countbit(int(x >> 32) & INT_MAX);
}
inline void printbit(int x, int len) {
  for (int i = len - 1; i >= 0; i--) printf("%d", getbit(x, i));
}
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
template <typename A, typename B>
ostream &operator<<(ostream &stream, const pair<A, B> &p) {
  stream << "{" << p.first << "," << p.second << "}";
  return stream;
}
template <typename A>
ostream &operator<<(ostream &stream, const vector<A> &v) {
  stream << "[";
  for (auto itr = v.begin(); itr != v.end(); itr++) stream << *itr << " ";
  stream << "]";
  return stream;
}
template <typename A, typename B>
ostream &operator<<(ostream &stream, const map<A, B> &v) {
  stream << "[";
  for (auto itr = v.begin(); itr != v.end(); itr++) stream << *itr << " ";
  stream << "]";
  return stream;
}
template <typename A>
ostream &operator<<(ostream &stream, const set<A> &v) {
  stream << "[";
  for (auto itr = v.begin(); itr != v.end(); itr++) stream << *itr << " ";
  stream << "]";
  return stream;
}
template <typename A>
ostream &operator<<(ostream &stream, const stack<A> &v) {
  stack<A> st = v;
  stream << "[";
  while (!st.empty()) {
    stream << st.top() << " ";
    st.pop();
  }
  stream << "]";
  return stream;
}
template <typename A>
ostream &operator<<(ostream &stream, const priority_queue<A> &v) {
  priority_queue<A> q = v;
  stream << "[";
  while (!q.empty()) {
    stream << q.top() << " ";
    q.pop();
  }
  stream << "]";
  return stream;
}
template <typename A>
ostream &operator<<(ostream &stream, const queue<A> &v) {
  queue<A> q = v;
  stream << "[";
  while (!q.empty()) {
    stream << q.front() << " ";
    q.pop();
  }
  stream << "]";
  return stream;
}
template <typename A>
ostream &operator<<(ostream &stream, const deque<A> &v) {
  deque<A> q = v;
  stream << "[";
  while (!q.empty()) {
    stream << q.front() << " ";
    q.pop_front();
  }
  stream << "]";
  return stream;
}
void run();
int main() {
  srand(time(NULL));
  run();
  return 0;
}
const int mod = 1e9 + 7;
const int N = 3e5 + 7;
const int M = 35;
struct SegmentTree {
  vector<int> tr, lp, rp;
  int n;
  int free_node;
  int root;
  SegmentTree(int _n) : n(_n), free_node(1), root(0) {
    tr.resize(N * M);
    lp.resize(N * M);
    rp.resize(N * M);
  }
  void change(int &v, int l, int r, int pos, int val) {
    if (v == 0) v = free_node++;
    if (l == r)
      tr[v] += val;
    else {
      int mid = (1ll * l + r) >> 1;
      if (pos <= mid)
        change(lp[v], l, mid, pos, val);
      else
        change(rp[v], mid + 1, r, pos, val);
      tr[v] = tr[lp[v]] + tr[rp[v]];
    }
  }
  void change(int pos, int val) { change(root, 0, n - 1, pos, val); }
  int get(int v, int l, int r, int k) {
    if (v == 0 || tr[v] < k) return -1;
    if (l == r) return l;
    int mid = (l * 1ll + r) >> 1;
    if (tr[lp[v]] >= k)
      return get(lp[v], l, mid, k);
    else
      return get(rp[v], mid + 1, r, k - tr[lp[v]]);
  }
  int get(int k) { return get(root, 0, n - 1, k); }
};
vector<pair<int, int> > act;
int l[N], r[N];
void run() {
  int n, k;
  scanf("%d%d", &n, &k);
  int cnt = 0;
  for (int i = 0; i < n; ++i) {
    scanf("%d%d", &l[i], &r[i]);
    l[i] += 1e9;
    r[i] += 1e9;
    act.emplace_back(l[i], 1);
    act.emplace_back(r[i], 2);
    act.emplace_back(r[i] + 1, -l[i]);
  }
  int res = 0;
  int resl = 0, resr = 0;
  sort(act.begin(), act.end());
  SegmentTree tree(2e9 + 2);
  cnt = 0;
  for (int i = 0; i < ((int)act.size()); ++i) {
    pair<int, int> &x = act[i];
    if (x.second == 1) {
      tree.change(x.first, 1);
      ++cnt;
    } else if (x.second != 2) {
      tree.change(-x.second, -1);
      --cnt;
    }
    if (i + 1 < ((int)act.size()) && act[i + 1].first == x.first) continue;
    if (cnt >= k && x.second > 0) {
      int t = tree.get(k);
      if (t == -1) continue;
      if (x.first - t + 1 > res) {
        res = x.first - t + 1;
        resl = t;
        resr = x.first;
      }
    }
  }
  vector<int> v;
  if (res == 0) {
    for (int i = 1; i <= k; ++i) v.push_back(i);
  } else {
    for (int i = 0; i < n && ((int)v.size()) < k; ++i) {
      if (l[i] <= resl && r[i] >= resr) v.push_back(i + 1);
    }
  }
  printf("%d", res);
  putchar('\n');
  for (int i = 0; i < k; ++i, putchar(' ')) printf("%d", v[i]);
  putchar('\n');
}

### Prompt

Please provide a cpp coded solution to the problem described below:

All our characters have hobbies. The same is true for Fedor. He enjoys shopping in the neighboring supermarket. 

The goods in the supermarket have unique integer ids. Also, for every integer there is a product with id equal to this integer. Fedor has n discount coupons, the i-th of them can be used with products with ids ranging from li to ri, inclusive. Today Fedor wants to take exactly k coupons with him.

Fedor wants to choose the k coupons in such a way that the number of such products x that all coupons can be used with this product x is as large as possible (for better understanding, see examples). Fedor wants to save his time as well, so he asks you to choose coupons for him. Help Fedor!

Input

The first line contains two integers n and k (1 ≤ k ≤ n ≤ 3·105) — the number of coupons Fedor has, and the number of coupons he wants to choose.

Each of the next n lines contains two integers li and ri ( - 109 ≤ li ≤ ri ≤ 109) — the description of the i-th coupon. The coupons can be equal.

Output

In the first line print single integer — the maximum number of products with which all the chosen coupons can be used. The products with which at least one coupon cannot be used shouldn't be counted.

In the second line print k distinct integers p1, p2, ..., pk (1 ≤ pi ≤ n) — the ids of the coupons which Fedor should choose.

If there are multiple answers, print any of them.

Examples

Input

4 2
1 100
40 70
120 130
125 180


Output

31
1 2 


Input

3 2
1 12
15 20
25 30


Output

0
1 2 


Input

5 2
1 10
5 15
14 50
30 70
99 100


Output

21
3 4 

Note

In the first example if we take the first two coupons then all the products with ids in range [40, 70] can be bought with both coupons. There are 31 products in total.

In the second example, no product can be bought with two coupons, that is why the answer is 0. Fedor can choose any two coupons in this example.

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
int break_point() {
  char c;
  while ((c = getchar()) != '\n')
    ;
  return 0;
}
template <typename T>
void read_integer(T &r) {
  bool sign = 0;
  r = 0;
  char c;
  while (1) {
    c = getchar();
    if (c == '-') {
      sign = 1;
      break;
    }
    if (c != ' ' && c != '\n') {
      r = c - '0';
      break;
    }
  }
  while (1) {
    c = getchar();
    if (c == ' ' || c == '\n') break;
    r = r * 10 + (c - '0');
  }
  if (sign) r = -r;
}
long long binpow(long long a, long long b) {
  long long ret = 1;
  while (b) {
    if (b & 1) ret = ret * a;
    a *= a;
    b >>= 1;
  }
  return ret;
}
long long binpow(long long a, long long b, int mod) {
  long long ret = 1;
  while (b) {
    if (b & 1) ret = (ret * a) % mod;
    a = (a * a) % mod;
    b >>= 1;
  }
  return ret;
}
inline int getbit(int x, int b) { return (x >> b) & 1; }
inline int setbit(int x, int b) { return x | (1 << b); }
inline void _setbit(int &x, int b) { x = setbit(x, b); }
inline long long setbit(long long x, int b) { return x | (1ll << b); }
inline void _setbit(long long &x, int b) { x = setbit(x, b); }
inline int unsetbit(int x, int b) { return x & (INT_MAX - (1 << b)); }
inline void _unsetbit(int &x, int b) { x = unsetbit(x, b); }
inline int countbit(int x) {
  x = x - ((x >> 1) & 0x55555555);
  x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
  return ((x + (x >> 4) & 0xF0F0F0F) * 0x1010101) >> 24;
}
inline long long countbit(long long x) {
  return countbit(int(x & INT_MAX)) + countbit(int(x >> 32) & INT_MAX);
}
inline void printbit(int x, int len) {
  for (int i = len - 1; i >= 0; i--) printf("%d", getbit(x, i));
}
int gcd(int a, int b) { return b == 0 ? a : gcd(b, a % b); }
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
template <typename A, typename B>
ostream &operator<<(ostream &stream, const pair<A, B> &p) {
  stream << "{" << p.first << "," << p.second << "}";
  return stream;
}
template <typename A>
ostream &operator<<(ostream &stream, const vector<A> &v) {
  stream << "[";
  for (auto itr = v.begin(); itr != v.end(); itr++) stream << *itr << " ";
  stream << "]";
  return stream;
}
template <typename A, typename B>
ostream &operator<<(ostream &stream, const map<A, B> &v) {
  stream << "[";
  for (auto itr = v.begin(); itr != v.end(); itr++) stream << *itr << " ";
  stream << "]";
  return stream;
}
template <typename A>
ostream &operator<<(ostream &stream, const set<A> &v) {
  stream << "[";
  for (auto itr = v.begin(); itr != v.end(); itr++) stream << *itr << " ";
  stream << "]";
  return stream;
}
template <typename A>
ostream &operator<<(ostream &stream, const stack<A> &v) {
  stack<A> st = v;
  stream << "[";
  while (!st.empty()) {
    stream << st.top() << " ";
    st.pop();
  }
  stream << "]";
  return stream;
}
template <typename A>
ostream &operator<<(ostream &stream, const priority_queue<A> &v) {
  priority_queue<A> q = v;
  stream << "[";
  while (!q.empty()) {
    stream << q.top() << " ";
    q.pop();
  }
  stream << "]";
  return stream;
}
template <typename A>
ostream &operator<<(ostream &stream, const queue<A> &v) {
  queue<A> q = v;
  stream << "[";
  while (!q.empty()) {
    stream << q.front() << " ";
    q.pop();
  }
  stream << "]";
  return stream;
}
template <typename A>
ostream &operator<<(ostream &stream, const deque<A> &v) {
  deque<A> q = v;
  stream << "[";
  while (!q.empty()) {
    stream << q.front() << " ";
    q.pop_front();
  }
  stream << "]";
  return stream;
}
void run();
int main() {
  srand(time(NULL));
  run();
  return 0;
}
const int mod = 1e9 + 7;
const int N = 3e5 + 7;
const int M = 35;
struct SegmentTree {
  vector<int> tr, lp, rp;
  int n;
  int free_node;
  int root;
  SegmentTree(int _n) : n(_n), free_node(1), root(0) {
    tr.resize(N * M);
    lp.resize(N * M);
    rp.resize(N * M);
  }
  void change(int &v, int l, int r, int pos, int val) {
    if (v == 0) v = free_node++;
    if (l == r)
      tr[v] += val;
    else {
      int mid = (1ll * l + r) >> 1;
      if (pos <= mid)
        change(lp[v], l, mid, pos, val);
      else
        change(rp[v], mid + 1, r, pos, val);
      tr[v] = tr[lp[v]] + tr[rp[v]];
    }
  }
  void change(int pos, int val) { change(root, 0, n - 1, pos, val); }
  int get(int v, int l, int r, int k) {
    if (v == 0 || tr[v] < k) return -1;
    if (l == r) return l;
    int mid = (l * 1ll + r) >> 1;
    if (tr[lp[v]] >= k)
      return get(lp[v], l, mid, k);
    else
      return get(rp[v], mid + 1, r, k - tr[lp[v]]);
  }
  int get(int k) { return get(root, 0, n - 1, k); }
};
vector<pair<int, int> > act;
int l[N], r[N];
void run() {
  int n, k;
  scanf("%d%d", &n, &k);
  int cnt = 0;
  for (int i = 0; i < n; ++i) {
    scanf("%d%d", &l[i], &r[i]);
    l[i] += 1e9;
    r[i] += 1e9;
    act.emplace_back(l[i], 1);
    act.emplace_back(r[i], 2);
    act.emplace_back(r[i] + 1, -l[i]);
  }
  int res = 0;
  int resl = 0, resr = 0;
  sort(act.begin(), act.end());
  SegmentTree tree(2e9 + 2);
  cnt = 0;
  for (int i = 0; i < ((int)act.size()); ++i) {
    pair<int, int> &x = act[i];
    if (x.second == 1) {
      tree.change(x.first, 1);
      ++cnt;
    } else if (x.second != 2) {
      tree.change(-x.second, -1);
      --cnt;
    }
    if (i + 1 < ((int)act.size()) && act[i + 1].first == x.first) continue;
    if (cnt >= k && x.second > 0) {
      int t = tree.get(k);
      if (t == -1) continue;
      if (x.first - t + 1 > res) {
        res = x.first - t + 1;
        resl = t;
        resr = x.first;
      }
    }
  }
  vector<int> v;
  if (res == 0) {
    for (int i = 1; i <= k; ++i) v.push_back(i);
  } else {
    for (int i = 0; i < n && ((int)v.size()) < k; ++i) {
      if (l[i] <= resl && r[i] >= resr) v.push_back(i + 1);
    }
  }
  printf("%d", res);
  putchar('\n');
  for (int i = 0; i < k; ++i, putchar(' ')) printf("%d", v[i]);
  putchar('\n');
}

```