#include <bits/stdc++.h>
const double PI =
    3.141592653589793238462643383279502884197169399375105820974944;
using namespace std;
const int si = 4 * 100010;
void solve() {
  int k;
  cin >> k;
  map<int, pair<int, int> > vec;
  vector<int> vec1[k];
  int flag = 0;
  pair<int, int> ans, ans1;
  ans.first = -1, ans.second = -1;
  ans1.first = -1, ans1.second = -1;
  for (long long i = 0; i < k; ++i) {
    int n;
    cin >> n;
    int sum = 0;
    for (long long j = 0; j < n; ++j) {
      int a;
      cin >> a;
      vec1[i].push_back(a);
      sum += a;
    }
    if (!flag) {
      for (long long j = 0; j < n; ++j) {
        sum -= vec1[i][j];
        if (vec[sum].first > 0 && vec[sum].second != i + 1) {
          ans.first = vec[sum].first;
          ans.second = vec[sum].second;
          ans1.first = j + 1;
          ans1.second = i + 1;
          ++flag;
        } else
          vec[sum] = make_pair(j + 1, i + 1);
        sum += vec1[i][j];
      }
    }
  }
  if (ans.first != -1) {
    cout << "YES"
         << "\n";
    cout << ans.second << " ";
    cout << ans.first << " ";
    cout << ""
         << "\n";
    cout << ans1.second << " ";
    cout << ans1.first << " ";
    cout << ""
         << "\n";
  } else {
    cout << "NO"
         << "\n";
  }
}
int main() {
  bool testing = false;
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  if (testing) {
    freopen("test.txt", "rt", stdin);
    int start = clock();
    solve();
    int end = clock();
    cout << "time: " << (end - start) / (double)(CLOCKS_PER_SEC)*1000
         << " milliseconds\n";
  } else {
    solve();
  }
}
