#include <bits/stdc++.h>
using namespace std;
const long long INF = 2 * 1e9;
const long long MAX = 1e5 + 47;
vector<long long> g[MAX];
vector<long long> type(MAX);
bool cmp(string a, string b) { return a.size() < b.size(); }
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n;
  cin >> n;
  map<long long, pair<long long, long long>> options;
  for (long long z = 0; z < n; z++) {
    long long k;
    cin >> k;
    vector<long long> cur(k);
    long long sum = 0;
    for (long long i = 0; i < k; i++) {
      cin >> cur[i];
      sum += cur[i];
    }
    for (long long i = 0; i < k; i++) {
      if (options.count(sum - cur[i]) && options[sum - cur[i]].first != z + 1) {
        cout << "YES" << endl;
        cout << options[sum - cur[i]].first << " "
             << options[sum - cur[i]].second << endl;
        cout << z + 1 << " " << i + 1;
        return 0;
      } else {
        options[sum - cur[i]] = {z + 1, i + 1};
      }
    }
  }
  cout << "NO";
  return 0;
}
