Problem: You are given n rectangles, labeled 1 through n. The corners of rectangles have integer coordinates and their edges are parallel to the Ox and Oy axes. The rectangles may touch each other, but they do not overlap (that is, there are no points that belong to the interior of more than one rectangle).

Your task is to determine if there's a non-empty subset of the rectangles that forms a square. That is, determine if there exists a subset of the rectangles and some square for which every point that belongs to the interior or the border of that square belongs to the interior or the border of at least one of the rectangles in the subset, and every point that belongs to the interior or the border of at least one rectangle in the subset belongs to the interior or the border of that square.

Input

First line contains a single integer n (1 ≤ n ≤ 105) — the number of rectangles. Each of the next n lines contains a description of a rectangle, with the i-th such line describing the rectangle labeled i. Each rectangle description consists of four integers: x1, y1, x2, y2 — coordinates of the bottom left and the top right corners (0 ≤ x1 < x2 ≤ 3000, 0 ≤ y1 < y2 ≤ 3000).

No two rectangles overlap (that is, there are no points that belong to the interior of more than one rectangle).

Output

If such a subset exists, print "YES" (without quotes) on the first line of the output file, followed by k, the number of rectangles in the subset. On the second line print k numbers — the labels of rectangles in the subset in any order. If more than one such subset exists, print any one. If no such subset exists, print "NO" (without quotes).

Examples

Input

9
0 0 1 9
1 0 9 1
1 8 9 9
8 1 9 8
2 2 3 6
3 2 7 3
2 6 7 7
5 3 7 6
3 3 5 6


Output

YES 5
5 6 7 8 9


Input

4
0 0 1 9
1 0 9 1
1 8 9 9
8 1 9 8


Output

NO

Note

The first test case looks as follows:

<image>

Note that rectangles 6, 8, and 9 form a square as well, and would be an acceptable answer.

The second test case looks as follows:

<image>

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
const double pi = acos(0.0) * 2.0;
const double eps = 1e-12;
const int step[8][2] = {{1, 0}, {-1, 0}, {0, 1},  {0, -1},
                        {1, 1}, {1, -1}, {-1, 1}, {-1, -1}};
template <class T>
inline T abs1(T a) {
  return a < 0 ? -a : a;
}
template <class T>
inline T max1(T a, T b, T c = -1234567, T d = -1234567) {
  T ans = a > b ? a : b;
  if (c != -1234567) ans = max1(ans, c);
  if (d != -1234567) ans = max1(ans, d);
  return ans;
}
template <class T>
inline T min1(T a, T b, T c = -1234567, T d = -1234567) {
  T ans = a < b ? a : b;
  if (c != -1234567) ans = min(ans, c);
  if (d != -1234567) ans = min(ans, d);
  return ans;
}
template <class T>
inline T gcd1(T a, T b) {
  if (a < b) swap(a, b);
  if (a % b == 0) return b;
  return gcd1(b, a % b);
}
template <class T>
inline T lb(T num) {
  return num & (-num);
}
inline int jud(double a, double b) {
  if (abs(a) < eps && abs(b) < eps)
    return 0;
  else if (abs1(a - b) / abs1(a) < eps)
    return 0;
  if (a < b) return -1;
  return 1;
}
template <typename t>
inline int jud(t a, t b) {
  if (a < b) return -1;
  if (a == b) return 0;
  return 1;
}
template <typename it, typename t1>
inline int find(t1 val, it a, int na, bool f_small = 1, bool f_lb = 1) {
  int be = 0, en = na - 1;
  if (*a <= *(a + na - 1)) {
    if (f_lb == 0)
      while (be < en) {
        int mid = (be + en + 1) / 2;
        if (jud(*(a + mid), val) != 1)
          be = mid;
        else
          en = mid - 1;
      }
    else
      while (be < en) {
        int mid = (be + en) / 2;
        if (jud(*(a + mid), val) != -1)
          en = mid;
        else
          be = mid + 1;
      }
    if (f_small && jud(*(a + be), val) == 1) be--;
    if (!f_small && jud(*(a + be), val) == -1) be++;
  } else {
    if (f_lb)
      while (be < en) {
        int mid = (be + en + 1) / 2;
        if (jud(*(a + mid), val) != -1)
          be = mid;
        else
          en = mid - 1;
      }
    else
      while (be < en) {
        int mid = (be + en) / 2;
        if (jud(*(a + mid), val) != 1)
          en = mid;
        else
          be = mid + 1;
      }
    if (!f_small && jud(*(a + be), val) == -1) be--;
    if (f_small && jud(*(a + be), val) == 1) be++;
  }
  return be;
}
inline int bitnum(unsigned long long nValue) {
  nValue = ((0xaaaaaaaaaaaaaaaaull & nValue) >> 1) +
           (0x5555555555555555ull & nValue);
  nValue = ((0xccccccccccccccccull & nValue) >> 2) +
           (0x3333333333333333ull & nValue);
  nValue = ((0xf0f0f0f0f0f0f0f0ull & nValue) >> 4) +
           (0x0f0f0f0f0f0f0f0full & nValue);
  nValue = ((0xff00ff00ff00ff00ull & nValue) >> 8) +
           (0x00ff00ff00ff00ffull & nValue);
  nValue = ((0xffff0000ffff0000ull & nValue) >> 16) +
           (0x0000ffff0000ffffull & nValue);
  nValue = ((0xffffffff00000000ull & nValue) >> 32) +
           (0x00000000ffffffffull & nValue);
  return nValue;
}
long long pow(long long n, long long m, long long mod = 0) {
  long long ans = 1;
  long long k = n;
  while (m) {
    if (m & 1) {
      ans *= k;
      if (mod) ans %= mod;
    }
    k *= k;
    if (mod) k %= mod;
    m >>= 1;
  }
  return ans;
}
const int maxn = 3110;
const int inf = 11000000;
int mp[maxn][maxn];
int dp[maxn][maxn][2][2];
int temp[maxn][maxn][2];
int maxl = 0;
int n;
inline pair<int, int> operator+(const pair<int, int> &a,
                                const pair<int, int> &b) {
  return make_pair(a.first + b.first, a.second + b.second);
}
inline pair<int, int> operator+(const pair<int, int> &a, const int &b) {
  return make_pair(a.first + b, a.second + b);
}
inline pair<int, int> operator-(const pair<int, int> &a, const int &b) {
  return make_pair(a.first - b, a.second - b);
}
int main() {
  ios_base::sync_with_stdio(0);
  scanf("%d", &n);
  memset(mp, -1, sizeof(mp));
  for (int i1 = 0; i1 < n; i1++) {
    int x1, y1, x2, y2;
    scanf("%d%d%d%d", &x1, &y1, &x2, &y2);
    for (int i = x1; i < x2; i++)
      for (int j = y1; j < y2; ++j) mp[i][j] = i1;
    maxl = max1(x2, y2, maxl);
  }
  for (int i = 0; i <= maxl; i++)
    for (int j = 0; j <= maxl; j++) dp[i][j][0][0] = dp[i][j][1][0] = inf;
  dp[0][0][0][0] = dp[0][0][1][0] = 0;
  for (int i = 0; i <= maxl; i++) temp[0][i][0] = temp[0][i][1] = 0;
  for (int i = 1; i <= maxl; i++)
    for (int j = 0; j <= maxl; j++) {
      if (j) {
        if (mp[i - 1][j - 1] != -1)
          temp[i][j][0] = temp[i - 1][j][0] + 1;
        else
          temp[i][j][0] = 0;
        if (mp[i - 1][j - 1] != mp[i - 1][j])
          temp[i][j][1] = temp[i - 1][j][1] + 1;
        else
          temp[i][j][1] = 0;
      } else {
        if (mp[i - 1][0] != -1)
          temp[i][j][1] = temp[i - 1][j][1] + 1;
        else
          temp[i][j][1] = 0;
      }
      dp[i][j][0][0] = min1(dp[i][j][0][0], temp[i][j][0]);
      dp[i][j][1][0] = min1(dp[i][j][1][0], temp[i][j][1]);
    }
  for (int i = 0; i <= maxl; i++) temp[i][0][0] = temp[i][0][1] = 0;
  for (int j = 1; j <= maxl; j++)
    for (int i = 0; i <= maxl; i++) {
      if (i) {
        if (mp[i - 1][j - 1] != -1)
          temp[i][j][0] = temp[i][j - 1][0] + 1;
        else
          temp[i][j][0] = 0;
        if (mp[i - 1][j - 1] != mp[i][j - 1])
          temp[i][j][1] = temp[i][j - 1][1] + 1;
        else
          temp[i][j][1] = 0;
      } else {
        if (mp[j - 1][0] != -1)
          temp[i][j][1] = temp[i][j - 1][1] + 1;
        else
          temp[i][j][1] = 0;
      }
      dp[i][j][0][0] = min1(dp[i][j][0][0], temp[i][j][0]);
      dp[i][j][1][0] = min1(dp[i][j][1][0], temp[i][j][1]);
    }
  for (int i = 0; i < maxl; i++)
    for (int j = 0; j < maxl; j++) dp[i][j][0][1] = dp[i][j][1][1] = inf;
  for (int j = 0; j <= maxl; j++) temp[maxl][j][0] = temp[maxl][j][1] = 0;
  for (int i = maxl - 1; i >= 0; i--)
    for (int j = 0; j < maxl; j++) {
      if (mp[i][j] != -1)
        temp[i][j][0] = temp[i + 1][j][0] + 1;
      else
        temp[i][j][0] = 0;
      if (j) {
        if (mp[i][j] != mp[i][j - 1])
          temp[i][j][1] = temp[i + 1][j][1] + 1;
        else
          temp[i][j][1] = 0;
      } else {
        if (mp[i][j] != -1)
          temp[i][j][1] = temp[i + 1][j][1] + 1;
        else
          temp[i][j][1] = 0;
      }
      dp[i][j][0][1] = min1(dp[i][j][0][1], temp[i][j][0]);
      dp[i][j][1][1] = min1(dp[i][j][1][1], temp[i][j][1]);
    }
  for (int i = 0; i <= maxl; i++) temp[i][maxl][0] = temp[i][maxl][1] = 0;
  for (int j = maxl - 1; j >= 0; j--)
    for (int i = 0; i < maxl; i++) {
      if (mp[i][j] != -1)
        temp[i][j][0] = temp[i][j + 1][0] + 1;
      else
        temp[i][j][0] = 0;
      if (i) {
        if (mp[i][j] != mp[i - 1][j])
          temp[i][j][1] = temp[i][j + 1][1] + 1;
        else
          temp[i][j][1] = 0;
      } else {
        if (mp[i][j] != -1)
          temp[i][j][1] = temp[i][j + 1][1] + 1;
        else
          temp[i][j][1] = 0;
      }
      dp[i][j][0][1] = min1(dp[i][j][0][1], temp[i][j][0]);
      dp[i][j][1][1] = min1(dp[i][j][1][1], temp[i][j][1]);
    }
  pair<int, int> ans[2] = {make_pair(-1, -1), make_pair(-1, -1)};
  pair<int, int> st[maxn];
  int lst = 0;
  for (int i = maxl - 1; i >= 1 - maxl && ans[0].first == -1; i--) {
    pair<int, int> be, en;
    if (i > 0)
      be = make_pair(i, 0), en = make_pair(maxl, maxl - i);
    else
      be = make_pair(0, -i), en = make_pair(maxl + i, maxl);
    en = en + 1;
    int temp[maxn];
    temp[be.first] = be.first;
    for (pair<int, int> j = be + 1; j != en; j = j + 1) {
      temp[j.first] =
          max(j.first - dp[j.first][j.second][0][0], temp[j.first - 1]);
    }
    lst = 0;
    en = en - 1;
    for (pair<int, int> j = en; j != be - 1; j = j - 1) {
      while (lst && st[lst - 1].first -
                            dp[st[lst - 1].first][st[lst - 1].second][1][0] >
                        j.first)
        lst--;
      if (lst && dp[j.first][j.second][1][1] + j.first >= st[lst - 1].first &&
          temp[st[lst - 1].first] <= j.first) {
        ans[0] = j;
        ans[1] = st[lst - 1];
        break;
      }
      while (lst && st[lst - 1].first -
                            dp[st[lst - 1].first][st[lst - 1].second][1][0] >
                        j.first - dp[j.first][j.second][1][0])
        lst--;
      st[lst++] = j;
    }
  }
  if (ans[0].first != -1) {
    bool f[100100] = {0};
    for (int i = ans[0].first; i < ans[1].first; i++)
      for (int j = ans[0].second; j < ans[1].second; j++) f[mp[i][j]] = 1;
    int cnt = 0;
    for (int i = 0; i < n; i++)
      if (f[i]) cnt++;
    printf("YES %d\n", cnt);
    for (int i = 0; i < n; i++)
      if (f[i]) printf("%d ", i + 1);
    printf("\n");
  } else
    cout << "NO" << endl;
  return 0;
}