#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e6 + 10;
typedef struct Item {
  long long v;
  int id;
  Item(long long a, int b) {
    v = a;
    id = b;
  }
  bool operator<(const Item &rhs) const { return v < rhs.v; }
} Item;
typedef struct Node {
  vector<int> p;
  vector<Item> pp;
  long long sum, r;
  int id;
  bool operator<(const Node &rhs) const {
    return pp.back().v < rhs.pp.back().v;
  }
} Node;
int n, m;
Node nd[MAXN];
int bs(int i, int u, int v, long long x) {
  if (u > v) return -1;
  int mid = u + (v - u) / 2;
  if (nd[i].pp[mid].v == x)
    return mid;
  else if (nd[i].pp[mid].v > x)
    return bs(i, u, mid - 1, x);
  return bs(i, mid + 1, v, x);
}
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << setprecision(10) << fixed;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int k;
    cin >> k;
    nd[i].sum = 0;
    nd[i].id = i + 1;
    for (int j = 0; j < k; j++) {
      long long v;
      cin >> v;
      nd[i].sum += v;
      nd[i].p.push_back(v);
    }
    for (int j = 0; j < k; j++)
      nd[i].pp.push_back(Item(nd[i].sum - nd[i].p[j], j + 1));
    sort(nd[i].pp.begin(), nd[i].pp.end());
    nd[i].r = nd[i].pp.back().v;
  }
  sort(nd, nd + n);
  bool found = false;
  for (int i = 1; i < n; i++) {
    for (int j = i - 1; j >= 0; j--) {
      if (nd[j].r < nd[i].pp[0].v) break;
      for (int k = 0; k < nd[j].pp.size(); k++) {
        int pos = bs(i, 0, nd[i].pp.size() - 1, nd[j].pp[k].v);
        if (pos > -1) {
          found = true;
          cout << "YES" << endl;
          cout << nd[i].id << " " << nd[i].pp[pos].id << endl;
          cout << nd[j].id << " " << nd[j].pp[k].id << endl;
          break;
        }
      }
      if (found) break;
    }
    if (found) break;
  }
  if (!found) cout << "NO" << endl;
  cerr << "execute time : " << (double)clock() / CLOCKS_PER_SEC << endl;
  return 0;
}
