#include <bits/stdc++.h>
const int inf = 0x3f3f3f3f;
using namespace std;
map<int, pair<int, int>> m;
int a[200005];
int p1, p2, p3, p4;
int main() {
  int n, flag = 0;
  ;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    int t, sum = 0;
    scanf("%d", &t);
    for (int j = 1; j <= t; j++) {
      scanf("%d", &a[j]);
      sum += a[j];
    }
    if (!flag) {
      for (int j = 1; j <= t; j++) {
        a[j] = (sum - a[j]);
        if (m.count(a[j])) {
          if (m[a[j]].first != i) {
            p1 = i;
            p2 = j, p3 = m[a[j]].first, p4 = m[a[j]].second;
            flag = 1;
            break;
          }
        }
        m[a[j]].first = i;
        m[a[j]].second = j;
      }
    }
  }
  if (flag)
    printf("YES\n%d %d\n%d %d\n", p1, p2, p3, p4);
  else
    printf("NO\n");
  return 0;
}
