#include <bits/stdc++.h>
using namespace std;
map<long long, pair<int, int> > a;
long long sum;
int n, tmp, cur;
int b[200000 + 5];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> tmp, sum = 0;
    for (int j = 1; j <= tmp; j++) {
      cin >> cur;
      sum += cur;
      b[j] = cur;
    }
    for (int j = 1; j <= tmp; j++) {
      pair<int, int> h = a[sum - b[j]];
      if (h == make_pair(0, 0))
        a[sum - b[j]] = make_pair(i, j);
      else if (i != h.first)
        return !(cout << "YES" << endl
                      << h.first << " " << h.second << endl
                      << i << " " << j);
    }
  }
  cout << "NO" << endl;
  return 0;
}
