#include <bits/stdc++.h>
using namespace std;
struct debugger {
  template <typename T>
  debugger& operator,(const T& v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
int main() {
  int k;
  scanf("%d", &k);
  map<long long, int> mp;
  mp.clear();
  vector<long long> a[k + 5];
  int p1 = -1, p2 = -1;
  long long x = -1e9;
  for (int i = 1; i <= k; i++) {
    int n;
    scanf("%d", &n);
    long long sum = 0;
    for (int j = 0; j < n; j++) {
      long long xx;
      scanf("%lld", &xx);
      a[i].push_back(xx);
      sum += xx;
    }
    if (x == -1e9) {
      for (int j = 0; j < n; j++) {
        long long now = sum - a[i][j];
        if (mp.find(now) != mp.end()) {
          p1 = mp[now];
          p2 = i;
          if (p1 != p2) {
            x = now;
            break;
          }
        } else
          mp[now] = i;
      }
    }
  }
  if (x == -1e9)
    printf("NO\n");
  else {
    printf("YES\n");
    int in1, in2;
    long long sum = 0;
    for (int i = 0; i < (int)a[p1].size(); i++) sum += a[p1][i];
    for (int i = 0; i < (int)a[p1].size(); i++) {
      if (x == (sum - a[p1][i])) {
        in1 = i + 1;
        break;
      }
    }
    sum = 0;
    for (int i = 0; i < (int)a[p2].size(); i++) sum += a[p2][i];
    for (int i = 0; i < (int)a[p2].size(); i++) {
      if (x == (sum - a[p2][i])) {
        in2 = i + 1;
        break;
      }
    }
    printf("%d %d\n%d %d\n", p1, in1, p2, in2);
  }
  return 0;
}
