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 inf = (1 << 30) - 1;
const long long linf = (1ll << 62) - 1;
const double eps = 1e-9;
const double pi = 4 * atan(1.0);
const int N = 1e5 + 100;
int n, k;
long long a[N], b[N], c[N];
pair<long long, int> inter[N], pinter[N];
int cnt[N];
long long gcd(long long a, long long b) {
  while (b) {
    long long y = a % b;
    a = b;
    b = y;
  }
  return a;
}
inline bool intersect(int f, int s, long long &res) {
  const long long r = 28318237214737ll;
  long long d = a[f] * b[s] - a[s] * b[f];
  if (d == 0) {
    return false;
  }
  long long dx = c[f] * b[s] - c[s] * b[f], dy = a[f] * c[s] - a[s] * c[f];
  if (d < 0) {
    d = -d, dx = -dx, dy = -dy;
  }
  long long g = gcd(gcd(abs(dx), abs(dy)), abs(d));
  d /= g, dx /= g, dy /= g;
  res = ((d * r + dx) * r + dy) * r;
  return true;
}
set<long long> used;
int wh[N];
int myrand() { return abs((int)(((long long)rand()) << 16) ^ rand()); }
double begins = clock();
inline bool solve(vector<int> cur, int k) {
  if ((clock() - begins) / CLOCKS_PER_SEC > 1.9) {
    puts("NO");
    exit(0);
  }
  static const long long r1 = 218321381232747ll;
  if (k < 0) {
    return false;
  }
  if (k >= ((int)(cur).size())) {
    puts("YES");
    k -= ((int)(cur).size());
    printf("%d\n", ::k - k);
    for (int i : cur) {
      printf("%d %d\n", i + 1, -1);
    }
    return true;
  }
  long long hash = 0;
  for (int i : cur) {
    hash = hash * r1 + i + 1;
  }
  if (used.find(hash) != used.end()) {
    return false;
  }
  used.insert(hash);
  for (int it = 0; it < k * 4; it++) {
    int line = myrand() % ((int)(cur).size());
    long long res;
    int interLen = 0;
    for (int i = 0; i < ((int)(cur).size()); i++) {
      if (!intersect(cur[line], cur[i], res)) {
        continue;
      }
      inter[interLen++] = make_pair(res, i);
    }
    sort(inter, inter + interLen);
    int cc = 0;
    fill_n(wh, ((int)(cur).size()), -1);
    for (int i = 0; i < interLen; i++) {
      wh[inter[i].second] = i;
      if (!i || inter[i].first != inter[i - 1].first) {
        cnt[cc] = 1;
        pinter[cc++] = inter[i];
      } else {
        cnt[cc - 1]++;
      }
    }
    for (int i = 0; i < cc; i++) {
      if ((cnt[i] + 1) * k >= ((int)(cur).size())) {
        vector<int> nextToTake;
        for (int j = 0; j < ((int)(cur).size()); j++) {
          if (j != line &&
              (wh[j] == -1 || inter[wh[j]].first != pinter[i].first)) {
            nextToTake.push_back(cur[j]);
          }
        }
        int a = cur[line], b = cur[pinter[i].second];
        if (solve(nextToTake, k - 1)) {
          printf("%d %d\n", a + 1, b + 1);
          return true;
        }
      }
    }
  }
  return false;
}
long long readLong() {
  int x;
  scanf("%d", &x);
  return x;
}
void gen() {
  freopen("D.in", "w", stdout);
  int n = 1e5, k = 5, c = 1000;
  cout << n << " " << k << endl;
  vector<pair<int, int> > pt(k);
  for (int i = 0; i < k; i++) {
    pt[i] = make_pair(myrand() % c, myrand() % c);
  }
  set<pair<pair<int, int>, int> > s;
  for (int i = 0; i < n; i++) {
    int p = rand() % k;
    pair<int, int> pt2;
    for (;;) {
      pt2 = make_pair(myrand() % c, myrand() % c);
      ;
      if (pt[p] != pt2) {
        int a = pt2.second - pt[p].second, b = pt[p].first - pt2.first,
            c = -(pt2.first * a + pt2.second * b);
        if (a < 0 || (a == 0 && b < 0)) {
          a = -a, b = -b, c = -c;
        }
        int d = gcd(a, b);
        a /= d, b /= d, c /= d;
        if (s.find(make_pair(make_pair(a, b), c)) != s.end()) {
          continue;
        }
        printf("%d %d %d\n", a, b, c);
        s.insert(make_pair(make_pair(a, b), c));
        break;
      }
    }
  }
  exit(0);
}
int main() {
  srand(time(NULL));
  double begin = clock();
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    a[i] = readLong();
    b[i] = readLong();
    c[i] = -readLong();
  }
  vector<int> cur(n);
  for (int i = 0; i < n; i++) {
    cur[i] = i;
  }
  if (!solve(cur, k)) {
    puts("NO");
  }
  42;
  return 0;
}