#include <bits/stdc++.h>
using namespace std;
vector<vector<long long>> v;
map<int, pair<int, int>> mp;
int main() {
  int k;
  scanf("%i", &k);
  v.resize(k + 1);
  for (int i = 1; i <= k; i++) {
    int x;
    scanf("%i", &x);
    v[i].push_back(0);
    for (int j = 1; j <= x; ++j) {
      int y;
      scanf("%i", &y);
      v[i][0] += y;
      v[i].push_back(y);
    }
  }
  for (int i = 1; i <= k; ++i) {
    for (int j = 1; j < v[i].size(); ++j) {
      long long x = v[i][0] - v[i][j];
      if (mp[x].first && mp[x].first != i) {
        cout << "YES" << endl
             << mp[x].first << " " << mp[x].second << endl
             << i << " " << j;
        return 0;
      } else {
        mp[x] = make_pair(i, j);
      }
    }
  }
  printf("NO");
  return 0;
}
