#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 100;
vector<long long> v[N];
map<long long, long long> mm;
long long add[N];
void fuck(vector<long long> &v, int k) {
  long long sum = 0;
  for (int i = 0; i < v.size(); i++) {
    sum += v[i];
  }
  add[k] = sum;
  set<long long> s;
  s.clear();
  for (int i = 0; i < v.size(); i++) {
    sum -= v[i];
    if (s.find(sum) == s.end()) {
      mm[sum]++;
      s.insert(sum);
    }
    sum += v[i];
  }
}
long long getValue(long long k, long long val) {
  for (int i = 0; i < v[k].size(); i++) {
    if (add[k] - v[k][i] == val) return i;
  }
  return -1;
}
int main() {
  long long n, q, i, j = 0, temp, ans = 0, sum = 0, x, y, z;
  scanf("%lld", &n);
  int fg = 0;
  for (int i = 0; i < n; i++) {
    long long m;
    scanf("%lld", &m);
    while (m--) {
      scanf("%lld", &x);
      v[i].push_back(x);
    }
    fuck(v[i], i);
  }
  for (auto it = mm.begin(); it != mm.end(); it++) {
    if (it->second >= 2) {
      ans = it->first;
      fg = 1;
      break;
    }
  }
  if (fg == 0) {
    cout << "NO\n";
    return 0;
  }
  int cnt = 0;
  cout << "YES\n";
  for (int i = 0; i < n; i++) {
    x = getValue(i, ans);
    if (x == -1) continue;
    cout << i + 1 << " " << x + 1 << endl;
    cnt++;
    if (cnt == 2) break;
  }
}
