#include <bits/stdc++.h>
using namespace std;
template <class T>
T sq(T x) {
  return x * x;
}
template <class T>
T gcd(T a, T b) {
  return (b != 0 ? gcd<T>(b, a % b) : a);
}
template <class T>
T lcm(T a, T b) {
  return (a / gcd<T>(a, b) * b);
}
const int N = 2e5 + 5;
int tc = 1;
map<long long, pair<int, int> > found;
vector<int> v[N];
long long total[N];
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int k, x, n;
  while (tc--) {
    cin >> k;
    for (long long j = 0; j < k; j++) {
      cin >> n;
      while (n--) {
        cin >> x;
        total[j] += x;
        v[j].push_back(x);
      }
    }
    int flg = 0;
    for (long long j = 0; j < k; j++) {
      if (flg) break;
      for (int i = 0; i < v[j].size(); i++) {
        int res = total[j] - v[j][i];
        if (found[res].first == 0) {
          found[res].first = j + 1;
          found[res].second = i + 1;
        } else if (found[res].first != j + 1) {
          cout << "YES"
               << "\n";
          cout << found[res].first << " " << found[res].second << "\n";
          cout << j + 1 << " " << i + 1 << "\n";
          flg = 1;
          break;
        }
      }
    }
    if (!flg) puts("NO");
  }
  return 0;
}
