Problem: One Khanate had a lot of roads and very little wood. Riding along the roads was inconvenient, because the roads did not have road signs indicating the direction to important cities.

The Han decided that it's time to fix the issue, and ordered to put signs on every road. The Minister of Transport has to do that, but he has only k signs. Help the minister to solve his problem, otherwise the poor guy can lose not only his position, but also his head.

More formally, every road in the Khanate is a line on the Oxy plane, given by an equation of the form Ax + By + C = 0 (A and B are not equal to 0 at the same time). You are required to determine whether you can put signs in at most k points so that each road had at least one sign installed.

Input

The input starts with two positive integers n, k (1 ≤ n ≤ 105, 1 ≤ k ≤ 5)

Next n lines contain three integers each, Ai, Bi, Ci, the coefficients of the equation that determines the road (|Ai|, |Bi|, |Ci| ≤ 105, Ai2 + Bi2 ≠ 0).

It is guaranteed that no two roads coincide.

Output

If there is no solution, print "NO" in the single line (without the quotes).

Otherwise, print in the first line "YES" (without the quotes).

In the second line print a single number m (m ≤ k) — the number of used signs. In the next m lines print the descriptions of their locations.

Description of a location of one sign is two integers v, u. If u and v are two distinct integers between 1 and n, we assume that sign is at the point of intersection of roads number v and u. If u = - 1, and v is an integer between 1 and n, then the sign is on the road number v in the point not lying on any other road. In any other case the description of a sign will be assumed invalid and your answer will be considered incorrect. In case if v = u, or if v and u are the numbers of two non-intersecting roads, your answer will also be considered incorrect.

The roads are numbered starting from 1 in the order in which they follow in the input.

Examples

Input

3 1
1 0 0
0 -1 0
7 -93 0


Output

YES
1
1 2


Input

3 1
1 0 0
0 1 0
1 1 3


Output

NO


Input

2 3
3 4 5
5 6 7


Output

YES
2
1 -1
2 -1

Note

Note that you do not have to minimize m, but it shouldn't be more than k.

In the first test all three roads intersect at point (0,0).

In the second test all three roads form a triangle and there is no way to place one sign so that it would stand on all three roads at once.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const int oo = 0x3f3f3f3f;
template <typename T>
inline bool chkmin(T &a, T b) {
  return a > b ? a = b, true : false;
}
template <typename T>
inline bool chkmax(T &a, T b) {
  return a < b ? a = b, true : false;
}
const int maxN = 1e5 + 5;
const double eps = 1e-9;
bool dcmp(double x) {
  if (fabs(x) < eps) return 0;
  return x > 0 ? 1 : -1;
}
struct Line {
  double a, b, c;
  Line() {}
  Line(double a, double b, double c) : a(a), b(b), c(c) {}
} l[maxN];
pair<double, double> GetInsection(Line a, Line b) {
  double retx = .0, rety = .0;
  if ((a.a == 0 && b.a == 0) || (a.b == 0 && b.b == 0))
    return make_pair(1e30, 1e30);
  if (b.a == 0 || b.b == 0) swap(a, b);
  if (a.a == 0) {
    rety = a.c / a.b;
    retx = (b.c - b.b * rety) / b.a;
    return make_pair(retx, rety);
  } else if (a.b == 0) {
    retx = a.c / a.a;
    rety = (b.c - b.a * retx) / b.b;
    return make_pair(retx, rety);
  } else {
    double A = a.a / a.b - b.a / b.b;
    if (dcmp(A) == 0)
      return make_pair(1e30, 1e30);
    else {
      retx = -(a.c / a.b - b.c / b.b) / A;
      rety = -(a.c / a.a - b.c / b.a) / (a.b / a.a - b.b / b.a);
      return make_pair(retx, rety);
    }
  }
}
bool OnLine(pair<double, double> a, Line b) {
  return dcmp(b.a * a.first + b.b * a.second + b.c) == 0;
}
int N, K;
bool Covered[maxN];
pair<int, int> ans[10];
int main() {
  srand(time(0));
  scanf("%d%d", &N, &K);
  for (int i = (1), _end = (N); i <= _end; ++i) {
    int a, b, c;
    scanf("%d%d%d", &a, &b, &c);
    l[i] = Line(a, b, c);
  }
  int R = N, T = 0;
  bool Ok = false;
  for (int i = (1), _end = (K); i <= _end; ++i) {
    bool flag = false;
    int l1 = 0, l2 = 0;
    T = i;
    for (int j = (1), _end = (300); j <= _end; ++j) {
      int u = rand() % N + 1;
      int v = rand() % N + 1;
      for (int t = 1; t <= 10 && u == v;
           u = rand() % N + 1, v = rand() % N + 1, t++) {
      }
      pair<double, double> Ins = GetInsection(l[u], l[v]);
      if (Ins.first == 1e30) continue;
      int cnt = 0;
      for (int k = (1), _end = (N); k <= _end; ++k) {
        if (Covered[k] == false && OnLine(Ins, l[k])) {
          cnt++;
          if (cnt * (K - i + 1) >= R) {
            flag = true;
            l1 = u;
            l2 = v;
            goto pos1;
          }
        }
      }
    }
  pos1:
    if (flag == false) {
      if ((K - i + 1) >= R) {
        ans[i].second = -1;
        for (int j = (1), _end = (N); j <= _end; ++j)
          if (Covered[j] == false) {
            ans[i].first = j;
            break;
          }
        R--;
        if (R == 0) {
          Ok = true;
          goto pos;
        }
        continue;
      } else {
        puts("NO");
        return 0;
      }
    } else {
      pair<double, double> Ins = GetInsection(l[l1], l[l2]);
      int cnt = 0;
      for (int j = (1), _end = (N); j <= _end; ++j)
        if (OnLine(Ins, l[j])) {
          cnt += Covered[j] == false;
          Covered[j] = true;
        }
      ans[i] = make_pair(l1, l2);
      R -= cnt;
      if (R == 0) {
        Ok = true;
        goto pos;
      }
    }
  }
pos:
  if (Ok) {
    puts("YES");
    printf("%d\n", T);
    for (int i = (1), _end = (T); i <= _end; ++i)
      printf("%d %d\n", ans[i].first, ans[i].second);
  } else
    puts("NO");
  return 0;
}