void main(){
  import std.stdio, std.algorithm, std.string, std.conv;

  struct P{
    int idx1, idx2;
  }
  int K; rd(K);
  P[int] set;
  for(int k=1; k<=K; k++){
    int n; rd(n);
    auto as=readln.split.to!(int[]);
    int s=reduce!"a+b"(as);
    P[] cand;
    foreach(int i, a; as){
      int t=s-a;
      if(t in set){
        if(set[t].idx1<k){
          writeln("YES");
          writeln(set[t].idx1, " ", set[t].idx2);
          writeln(k, " ", i+1);
          return;
        }
      }else{
        set[t]=P(k, i+1);
      }
    }
  }

  writeln("NO");
}

void rd(T...)(ref T x){
  import std.stdio, std.string, std.conv;
  auto l=readln.split;
  assert(l.length==x.length);
  foreach(i, ref e; x) e=l[i].to!(typeof(e));
}