#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> arr[n];
  map<long long, int> mp;
  vector<long long> summer(n);
  for (int i = 0; i < n; i++) {
    int m;
    cin >> m;
    int tmp;
    long long sum = 0;
    for (int j = 0; j < m; j++) {
      cin >> tmp;
      arr[i].push_back(tmp);
      sum += tmp;
    }
    summer[i] = sum;
    for (int j = 0; j < m; j++) {
      long long key = sum - arr[i][j];
      if (mp.find(key) != mp.end()) {
        if (mp[key] != i) {
          cout << "YES\n" << i + 1 << " " << j + 1 << "\n";
          int cur = mp[key];
          cout << cur + 1 << " ";
          int check = summer[cur] - key;
          for (int k = 0; k < arr[cur].size(); k++) {
            if (arr[cur][k] == check) {
              cout << k + 1;
              return 0;
            }
          }
        }
      } else {
        mp[key] = i;
      }
    }
  }
  cout << "NO";
}
