#include <bits/stdc++.h>
using namespace std;
vector<int> arr[200055];
int tot_sum[200005];
multimap<int, pair<int, int> > mymap;
multimap<int, pair<int, int> >::iterator it;
int main() {
  int n, k;
  scanf("%d", &k);
  for (int i = 0; i < k; i++) {
    scanf("%d", &n);
    int sum = 0;
    for (int j = 0; j < n; j++) {
      int x;
      scanf("%d", &x);
      arr[i].push_back(x);
      sum = sum + x;
    }
    tot_sum[i] = sum;
  }
  for (int i = 0; i < k; i++) {
    n = arr[i].size();
    for (int j = 0; j < n; j++) {
      int left = tot_sum[i] - arr[i][j];
      it = mymap.find(left);
      if (it != mymap.end() && it->second.first != i + 1) {
        puts("YES");
        pair<int, int> var = it->second;
        cout << var.first << ' ' << var.second << "\n";
        cout << i + 1 << ' ' << j + 1 << "\n";
        return 0;
      } else {
        mymap.insert(make_pair(left, pair<int, int>(i + 1, j + 1)));
      }
    }
  }
  puts("NO");
  return 0;
}
