#include <bits/stdc++.h>
using namespace std;
long long int power(long long int x, long long int y) {
  long long int res = 1;
  while (y > 0) {
    if (y & 1) res = res * x;
    y = y >> 1;
    x = x * x;
  }
  return res;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int k;
  cin >> k;
  vector<vector<int>> v;
  map<long long int, long long int> mp;
  for (int i = 0; i < k; i++) {
    int n;
    cin >> n;
    vector<int> temp(n);
    long long int sum = 0;
    for (int j = 0; j < n; j++) {
      cin >> temp[j];
      sum += temp[j];
    }
    v.push_back(temp);
    for (int j = 0; j < n; j++) {
      if (mp.find(sum - temp[j]) == mp.end())
        mp[sum - temp[j]] = i;
      else if (mp[sum - temp[j]] != i) {
        int idx = mp[sum - temp[j]];
        vector<int> a = v[idx];
        long long int t, sum2 = 0;
        for (int c = 0; c < a.size(); c++) {
          sum2 += a[c];
        }
        for (int v = 0; v < a.size(); v++) {
          if (sum2 - a[v] == sum - temp[j]) {
            t = v;
            break;
          }
        }
        cout << "YES\n";
        cout << i + 1 << " " << j + 1 << '\n';
        cout << idx + 1 << " " << t + 1 << '\n';
        return 0;
      }
    }
  }
  cout << "NO\n";
  return 0;
}
