#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
map<long long, int> mp, mp2;
vector<int> data[N];
long long sum[N], t;
map<int, int> id[N];
int len, k, n;
int main() {
  scanf("%d", &k);
  for (int i = 1; i <= k; i++) {
    scanf("%d", &n);
    for (int j = 1; j <= n; j++)
      scanf("%I64d", &t), sum[i] += t, data[i].push_back(t), id[i][t] = j;
    sort(data[i].begin(), data[i].end());
    data[i].erase(unique(data[i].begin(), data[i].end()), data[i].end());
  }
  for (int i = 1; i <= k; i++) {
    len = data[i].size();
    for (int j = 0; j < len; j++) {
      if (mp[sum[i] - data[i][j]]) {
        puts("YES");
        printf("%d %d\n", mp2[sum[i] - data[i][j]], mp[sum[i] - data[i][j]]);
        printf("%d %d\n", i, id[i][data[i][j]]);
        return 0;
      } else {
        mp2[sum[i] - data[i][j]] = i;
        mp[sum[i] - data[i][j]] = id[i][data[i][j]];
      }
    }
  }
  puts("NO");
  return 0;
}
