#include <bits/stdc++.h>
using namespace ::std;
template <class T>
istream& operator>>(istream& I, vector<T>& v) {
  for (T& e : v) I >> e;
  return I;
}
template <class T>
ostream& operator<<(ostream& O, const vector<T>& v) {
  for (const T& e : v) O << e << ' ';
  return O;
}
template <class T>
ostream& operator<<(ostream& O, const deque<T>& v) {
  for (const T& e : v) O << e << ' ';
  return O;
}
void _main() {
  int k;
  cin >> k;
  vector<vector<int>> vec;
  for (int i = 0; i < k; i++) {
    int n;
    cin >> n;
    vector<int> temp(n);
    cin >> temp;
    vec.emplace_back(temp);
  }
  map<int, vector<pair<int, int>>> m;
  for (int i = 0; i < k; i++) {
    int n = vec[i].size();
    int sum = accumulate((vec[i]).begin(), (vec[i]).end(), 0);
    set<int> vis;
    for (int j = 0; j < n; j++) {
      if (m.count(sum - vec[i][j])) {
        if (!(vis.count(sum - vec[i][j]) && m[sum - vec[i][j]].size() == 1)) {
          cout << "YES\n";
          cout << i + 1 << ' ' << j + 1 << '\n'
               << m[sum - vec[i][j]].front().first << ' '
               << m[sum - vec[i][j]].front().second;
          return;
        }
      }
      if (vis.count(sum - vec[i][j])) continue;
      m[sum - vec[i][j]].emplace_back(i + 1, j + 1);
      vis.emplace(sum - vec[i][j]);
    }
  }
  cout << "NO\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int _t = 1;
  while (_t--) _main();
  return 0;
}
