#include <bits/stdc++.h>
using namespace std;
int main() {
  int k;
  cin >> k;
  vector<int> store[k];
  int sum[k];
  for (int i = 0; i < k; i++) {
    int a;
    cin >> a;
    sum[i] = 0;
    for (int j = 0; j < a; j++) {
      int p;
      cin >> p;
      store[i].push_back(p);
      sum[i] += p;
    }
  }
  unordered_map<int, pair<int, int> > mp;
  for (int i = 0; i < k; i++) {
    for (int j = 0; j < store[i].size(); j++) {
      int fi = sum[i] - store[i][j];
      if (mp.find(fi) != mp.end() && mp[fi].first != i + 1) {
        cout << "YES" << endl;
        cout << mp[fi].first << " " << mp[fi].second << endl;
        cout << i + 1 << " " << j + 1;
        return 0;
      } else {
        mp[fi] = make_pair(i + 1, j + 1);
      }
    }
  }
  cout << "NO";
  return 0;
}
