#include <bits/stdc++.h>
using namespace std;
map<int, pair<int, int> > table;
map<int, pair<int, int> >::iterator it;
int k;
int a[200000 + 14];
int main() {
  cin >> k;
  bool flag = 0;
  for (int i = 1; i <= k; ++i) {
    int n, sum = 0;
    cin >> n;
    for (int j = 1; j <= n; ++j) {
      cin >> a[j];
      sum += a[j];
    }
    for (int j = 1; j <= n; ++j) {
      it = table.find(sum - a[j]);
      if (it != table.end()) {
        flag = 1;
        cout << "YES" << endl << i << " " << j << endl;
        cout << it->second.first;
        cout << " ";
        cout << it->second.second;
        cout << endl;
        return 0;
      }
    }
    for (int j = 1; j <= n; ++j) {
      table[sum - a[j]] = make_pair(i, j);
    }
  }
  cout << "NO" << endl;
  return 0;
}
