#include <bits/stdc++.h>
using namespace std;
struct Kapa {
  int sum, p, seq;
  Kapa(int su, int pos, int s) : sum(su), p(pos), seq(s) {}
};
bool func(const Kapa &a, const Kapa &b) { return a.sum < b.sum; }
int main() {
  int n;
  scanf("%d", &n);
  vector<vector<int> > V(n);
  vector<Kapa> master;
  for (int i = 0; i < n; i++) {
    int x;
    int s = 0;
    scanf("%d", &x);
    for (int j = 0; j < x; j++) {
      int tmp;
      scanf("%d", &tmp);
      V[i].push_back(tmp);
      s += tmp;
    }
    for (int j = 0; j < x; j++) {
      master.push_back(Kapa(s - V[i][j], j, i));
    }
  }
  sort(master.begin(), master.end(), func);
  bool alpha = false;
  for (int i = 1; i < master.size(); i++) {
    if (master[i - 1].sum == master[i].sum and
        master[i - 1].seq != master[i].seq) {
      puts("YES");
      alpha = true;
      printf("%d %d\n", master[i - 1].seq + 1, master[i - 1].p + 1);
      printf("%d %d\n", master[i].seq + 1, master[i].p + 1);
      break;
    }
  }
  if (not alpha) {
    puts("NO");
  }
  return 0;
}
