#include <bits/stdc++.h>
using namespace std;
const long long MAX = 1e6 + 8;
const long long MOD = 1e9 + 7;
const long long sz = 1e5 + 5;
void f_io() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
}
int32_t main() {
  f_io();
  long long tc = 1;
  while (tc--) {
    long long n;
    cin >> n;
    vector<pair<long long, pair<long long, long long>>> mp;
    for (long long i = 0; i < n; i++) {
      long long l, sum = 0;
      cin >> l;
      vector<long long> temp(l);
      for (auto &el : temp) {
        cin >> el;
        sum += el;
      }
      long long ind = 0;
      for (auto el : temp) {
        mp.push_back({sum - el, {i, ind++}});
      }
    }
    long long flag = 0;
    stable_sort(begin(mp), end(mp));
    for (long long i = 0; i < mp.size() - 1; i++) {
      if (mp[i].first == mp[i + 1].first) {
        if (mp[i].second.first != mp[i + 1].second.first) {
          cout << "YES"
               << "\n";
          cout << mp[i].second.first + 1 << " " << mp[i].second.second + 1
               << "\n";
          cout << mp[i + 1].second.first + 1 << " "
               << mp[i + 1].second.second + 1 << "\n";
          flag = 1;
          break;
        }
      }
    }
    if (!flag)
      cout << "NO"
           << "\n";
  }
}
