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;
template <typename T1, typename T2>
inline T1 max(T1 a, T2 b) {
  return a < b ? b : a;
}
template <typename T1, typename T2>
inline T1 min(T1 a, T2 b) {
  return a < b ? a : b;
}
const char lf = '\n';
namespace ae86 {
const int bufl = 1 << 15;
char buf[bufl], *s = buf, *t = buf;
inline int fetch() {
  if (s == t) {
    t = (s = buf) + fread(buf, 1, bufl, stdin);
    if (s == t) return EOF;
  }
  return *s++;
}
inline int ty() {
  int a = 0;
  int b = 1, c = fetch();
  while (!isdigit(c)) b ^= c == '-', c = fetch();
  while (isdigit(c)) a = a * 10 + c - 48, c = fetch();
  return b ? a : -a;
}
}  // namespace ae86
using ae86::ty;
const int _ = 100007;
const double eps = 1e-10;
inline int dcmp(double x) {
  if (-eps < x && x < eps) return 0;
  return x > 0 ? 1 : -1;
}
mt19937 randing(time(0));
inline int randlr(int l, int r) { return randing() % (r - l + 1) + l; }
struct points {
  double x, y;
  points(double x_ = 0, double y_ = 0) { x = x_, y = y_; }
  friend points operator+(points a, points b) {
    return points(a.x + b.x, a.y + b.y);
  }
  friend points operator-(points a, points b) {
    return points(a.x - b.x, a.y - b.y);
  }
  inline int valid() {
    return !isinf(x) && !isnan(x) && !isinf(y) && !isnan(y);
  }
};
inline double dox(points a, points b) { return a.x * b.x + a.y * b.y; }
inline double cox(points a, points b) { return a.x * b.y - a.y * b.x; }
struct lines {
  int id;
  double a, b, c;
  lines(int id_ = 0, double a_ = 0, double b_ = 0, double c_ = 0) {
    id = id_, a = a_, b = b_, c = c_;
  }
  inline int ison(points x) { return dcmp(a * x.x + b * x.y + c) == 0; }
};
points llcrash(lines a, lines b) {
  double A = a.a, B = a.b, C = a.c, D = b.a, E = b.b, F = b.c;
  return points((F * B - C * E) / (A * E - B * D),
                (A * F - C * D) / (B * D - A * E));
}
int n, m;
vector<lines> res;
pair<int, int> ans[9];
int now;
int main() {
  ios::sync_with_stdio(0), cout.tie(nullptr);
  n = ty(), m = ty();
  for (int i = 1; i <= n; i++) {
    int a = ty(), b = ty(), c = ty();
    res.emplace_back(i, a, b, c);
  }
  now = 0;
  while (!res.empty()) {
    if (m >= ((int)((res).size()))) {
      while (((int)((res).size())))
        ans[++now] = make_pair(res[((int)((res).size())) - 1].id, -1),
        res.pop_back();
      break;
    }
    points cho;
    int got = 0;
    for (int i = 1; i <= 333; i++) {
      int a = randlr(0, ((int)((res).size())) - 1),
          b = randlr(0, ((int)((res).size())) - 1);
      cho = llcrash(res[a], res[b]);
      if (!cho.valid()) continue;
      int cnt = 0;
      for (auto j : res)
        if (j.ison(cho)) cnt++;
      if (cnt * m >= ((int)((res).size()))) {
        ans[++now] = make_pair(res[a].id, res[b].id), got = 1;
        break;
      }
    }
    if (!got) {
      cout << "NO" << lf;
      return 0;
    }
    for (int i = ((int)((res).size())) - 1; i >= 0; i--)
      if (res[i].ison(cho))
        swap(res[i], res[((int)((res).size())) - 1]), res.pop_back();
    m--;
  }
  cout << "YES" << lf << now << lf;
  for (int i = 1; i <= now; i++)
    cout << ans[i].first << ' ' << ans[i].second << lf;
  return 0;
}