Problem: 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.

Solution (in JAVA):

Solution:
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.io.BufferedWriter;
import java.util.PriorityQueue;
import java.util.Collection;
import java.util.Deque;
import java.util.AbstractCollection;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.Comparator;
import java.util.ArrayDeque;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Jialin Ouyang (Jialin.Ouyang@gmail.com)
 */
public class Main {
  public static void main(String[] args) {
    InputStream inputStream = System.in;
    OutputStream outputStream = System.out;
    QuickScanner in = new QuickScanner(inputStream);
    QuickWriter out = new QuickWriter(outputStream);
    TaskD solver = new TaskD();
    solver.solve(1, in, out);
    out.close();
  }

  static class TaskD {
    int n;
    int k;
    TaskD.Range[] lowerRanges;
    TaskD.Range[] upperRanges;
    IntArrayList lst;
    TopK topK;

    public void solve(int testNumber, QuickScanner in, QuickWriter out) {
      n = in.nextInt();
      k = in.nextInt();
      lowerRanges = new TaskD.Range[n];
      upperRanges = new TaskD.Range[n];
      for (int i = 0; i < n; ++i) {
        int lower = in.nextInt();
        int upper = in.nextInt();
        TaskD.Range range = new TaskD.Range(lower, upper, i);
        lowerRanges[i] = upperRanges[i] = range;
      }
      Arrays.sort(lowerRanges, TaskD.Range.LOWER);
      Arrays.sort(upperRanges, TaskD.Range.UPPER);
      topK = new TopK();
      int res = calc(false, -1);
      out.println(res);
      lst = new IntArrayList(k);
      if (res == 0) {
        for (int i = 0; i < k; ++i) {
          lst.add(i);
        }
      } else {
        calc(true, res);
      }
      for (int i = 0; i < k; ++i) {
        if (i > 0) out.print(' ');
        out.print(lst.get(i) + 1);
      }
      out.println();
    }

    int calc(boolean getList, int resGap) {
      topK.init();
      int res = 0;
      int lowerPnt = 0, upperPnt = 0;
      for (int i = 0; i < n; ++i) {
        TaskD.Range range = upperRanges[i];
        topK.bound = range.upper;
        for (; lowerPnt < n && lowerRanges[lowerPnt].lower <= range.upper; ++lowerPnt) {
          topK.add(lowerRanges[lowerPnt]);
        }
        for (; upperPnt < n && upperRanges[upperPnt].upper < range.upper; ++upperPnt) {
          topK.remove(upperRanges[upperPnt]);
        }
        TaskD.Range kRange = topK.getK();
        if (kRange == null) continue;
        int curRes = range.upper - Math.max(kRange.lower, range.lower) + 1;
        if (getList) {
          if (resGap == curRes) {
            topK.update(lst, range.idx);
            break;
          }
        } else {
          res = Math.max(res, curRes);
        }
      }
      return res;
    }

    static class Range {
      static Comparator<TaskD.Range> LOWER = Comparator.comparingInt(range -> range.lower);
      static Comparator<TaskD.Range> UPPER = Comparator.comparingInt(range -> range.upper);
      static Comparator<TaskD.Range> LOWER_REVERSE = Comparator.comparingInt(range -> -range.lower);
      final int lower;
      final int upper;
      final int idx;

      Range(int lower, int upper, int idx) {
        this.lower = lower;
        this.upper = upper;
        this.idx = idx;
      }


      public String toString() {
        return String.format("[%d,%d]:%d", lower, upper, idx);
      }

    }

    class TopK {
      final SmartPriorityQueue topK;
      final SmartDeque appendix;
      int bound;

      TopK() {
        topK = new SmartPriorityQueue();
        appendix = new SmartDeque();
      }

      void init() {
        topK.init();
        appendix.init();
      }

      void add(TaskD.Range range) {
        topK.add(range);
        if (topK.size() > k) {
          appendix.add(topK.last());
          topK.remove(topK.last());
        }
      }

      void remove(TaskD.Range range) {
        if (topK.contains(range)) {
          topK.remove(range);
          if (!appendix.isEmpty()) {
            topK.add(appendix.first());
            appendix.remove(appendix.first());
          }
        } else {
          appendix.remove(range);
        }
      }

      TaskD.Range getK() {
        return topK.size() == k ? topK.last() : null;
      }

      void update(IntArrayList lst, int idx) {
        topK.update(lst, idx);
      }

    }

    class SmartDeque {
      boolean[] inQueue;
      boolean[] inQueueActual;
      Deque<TaskD.Range> queue;

      SmartDeque() {
        inQueue = new boolean[n];
        inQueueActual = new boolean[n];
        queue = new ArrayDeque<>(n);
      }

      void init() {
        Arrays.fill(inQueue, false);
        Arrays.fill(inQueueActual, false);
        queue.clear();
      }

      void add(TaskD.Range range) {
//if (range.idx == 1) System.out.println("add to SmartDeque");
        if (!inQueue[range.idx]) {
          if (!inQueueActual[range.idx]) {
            queue.addLast(range);
            inQueueActual[range.idx] = true;
          }
          inQueue[range.idx] = true;
        }
      }

      void remove(TaskD.Range range) {
//if (range.idx == 1) System.out.println("remove from SmartDeque");
        inQueue[range.idx] = false;
      }

      boolean isEmpty() {
        adjust();
        return queue.isEmpty();
      }

      TaskD.Range first() {
        adjust();
        return queue.getFirst();
      }

      void adjust() {
        while (!queue.isEmpty() && !inQueue[queue.getFirst().idx]) {
          inQueueActual[queue.pollFirst().idx] = false;
        }
      }

    }

    class SmartPriorityQueue {
      boolean[] inQueue;
      boolean[] inQueueActual;
      PriorityQueue<TaskD.Range> queue;
      int size;

      SmartPriorityQueue() {
        inQueue = new boolean[n];
        inQueueActual = new boolean[n];
        queue = new PriorityQueue<>(k + 1, TaskD.Range.LOWER_REVERSE);
      }

      void init() {
        Arrays.fill(inQueue, false);
        Arrays.fill(inQueueActual, false);
        queue.clear();
        size = 0;
      }

      void add(TaskD.Range range) {
//if (range.idx == 1) System.out.println("add to SmartPriorityQueue");
        if (!inQueue[range.idx]) {
          if (!inQueueActual[range.idx]) {
            queue.add(range);
            inQueueActual[range.idx] = true;
          }
          inQueue[range.idx] = true;
          ++size;
        }
      }

      boolean contains(TaskD.Range range) {
        return inQueue[range.idx];
      }

      void remove(TaskD.Range range) {
//if (range.idx == 1) System.out.println("remove from SmartPriorityQueue");
        if (inQueue[range.idx]) {
          inQueue[range.idx] = false;
          --size;
        }
      }

      int size() {
        return size;
      }

      TaskD.Range last() {
        adjust();
        return queue.peek();
      }

      void update(IntArrayList lst, int idx) {
        lst.clear();
        boolean found = false;
        for (TaskD.Range range : queue)
          if (inQueue[range.idx]) {
            lst.add(range.idx);
            if (range.idx == idx) {
              found = true;
            }
          }
        if (!found) {
          lst.pollLast();
          lst.add(idx);
        }
      }

      void adjust() {
        while (!queue.isEmpty() && !inQueue[queue.peek().idx]) {
          inQueueActual[queue.poll().idx] = false;
        }
      }

    }

  }

  static class QuickWriter {
    private final PrintWriter writer;

    public QuickWriter(OutputStream outputStream) {
      this.writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
    }

    public QuickWriter(Writer writer) {
      this.writer = new PrintWriter(writer);
    }

    public void print(Object... objects) {
      for (int i = 0; i < objects.length; ++i) {
        if (i > 0) {
          writer.print(' ');
        }
        writer.print(objects[i]);
      }
    }

    public void println(Object... objects) {
      print(objects);
      writer.print('\n');
    }

    public void close() {
      writer.close();
    }

  }

  static class IntArrayUtils {
    public static String toString(int[] values, int fromIdx, int toIdx) {
      StringBuilder sb = new StringBuilder("[");
      for (int i = fromIdx; i < toIdx; ++i) {
        if (i != fromIdx) sb.append(", ");
        sb.append(values[i]);
      }
      return sb.append("]").toString();
    }

  }

  static interface IntCollection {
  }

  static class QuickScanner {
    private static final int BUFFER_SIZE = 1024;
    private InputStream stream;
    private byte[] buffer;
    private int currentPosition;
    private int numberOfChars;

    public QuickScanner(InputStream stream) {
      this.stream = stream;
      this.buffer = new byte[BUFFER_SIZE];
      this.currentPosition = 0;
      this.numberOfChars = 0;
    }

    public int nextInt() {
      int c = nextNonSpaceChar();
      boolean positive = true;
      if (c == '-') {
        positive = false;
        c = nextChar();
      }
      int res = 0;
      do {
        if (c < '0' || '9' < c) throw new RuntimeException();
        res = res * 10 + c - '0';
        c = nextChar();
      } while (!isSpaceChar(c));
      return positive ? res : -res;
    }

    public int nextNonSpaceChar() {
      int res = nextChar();
      for (; isSpaceChar(res) || res < 0; res = nextChar()) ;
      return res;
    }

    public int nextChar() {
      if (numberOfChars == -1) {
        throw new RuntimeException();
      }
      if (currentPosition >= numberOfChars) {
        currentPosition = 0;
        try {
          numberOfChars = stream.read(buffer);
        } catch (Exception e) {
          throw new RuntimeException(e);
        }
        if (numberOfChars <= 0) {
          return -1;
        }
      }
      return buffer[currentPosition++];
    }

    public boolean isSpaceChar(int c) {
      return c == ' ' || c == '\t' || isEndOfLineChar(c);
    }

    public boolean isEndOfLineChar(int c) {
      return c == '\n' || c == '\r' || c < 0;
    }

  }

  static class IntArrayList implements IntCollection {
    private static final int[] EMPTY = {};
    public int[] values;
    public int size;

    public IntArrayList() {
      values = EMPTY;
      clear();
    }

    public IntArrayList(int capacity) {
      values = new int[Integer.highestOneBit(capacity) << 1];
      clear();
    }


    public void clear() {
      size = 0;
    }


    public void add(int value) {
      ensureCapacity(size + 1);
      values[size++] = value;
    }

    public int pollLast() {
      return values[--size];
    }

    public int get(int idx) {
      if (idx >= size) throw new ArrayIndexOutOfBoundsException();
      return values[idx];
    }


    public String toString() {
      return IntArrayUtils.toString(values, 0, size);
    }

    public void ensureCapacity(int capacity) {
      if (capacity <= values.length) return;
      int[] newValues = new int[Integer.highestOneBit(capacity) << 1];
      for (int i = 0; i < size; ++i) {
        newValues[i] = values[i];
      }
      values = newValues;
    }

  }
}