#include <bits/stdc++.h>
using namespace std;
int const N = 2e5 + 100;
int n, k;
vector<vector<int>> v;
long long s[N];
map<long long, pair<int, int>> mp;
int main() {
  scanf("%d", &k);
  v.resize(k + 1);
  for (int i = 1; i <= k; i++) {
    scanf("%d", &n);
    v[i].resize(n + 1);
    for (int j = 1; j <= n; j++) {
      scanf("%d", &v[i][j]);
      s[i] += v[i][j];
    }
  }
  for (int i = 1; i <= k; ++i) {
    for (int j = 1; j <= v[i].size() - 1; ++j) {
      long long sm = s[i] - v[i][j];
      int &x = mp[sm].first, &y = mp[sm].second;
      if (x == 0) {
        x = i, y = j;
      } else if (x != i) {
        puts("YES");
        printf("%d %d\n", x, y);
        printf("%d %d\n", i, j);
        return 0;
      }
    }
  }
  puts("NO");
  return 0;
}
