#include <bits/stdc++.h>
using namespace std;
int dx[] = {1, -1, 0, 0};
int dy[] = {0, 0, 1, -1};
const int mod = 1000000007;
const double pi = (double)22 / 7;
int n;
vector<long long> v, d, p;
int main() {
  cin.tie(0);
  std::ios::sync_with_stdio(false);
  cin >> n;
  v.resize(n);
  p.resize(n);
  d.resize(n);
  for (int i = 0; i < n; i++) cin >> v[i] >> d[i] >> p[i];
  vector<int> ans;
  for (int i = 0; i < n; i++) {
    if (p[i] >= 0) {
      ans.push_back(i + 1);
      long long run = 0;
      int c = 0;
      for (int j = i + 1; j < n; j++) {
        if (p[j] < 0) continue;
        p[j] -= max(v[i] - c, 0LL) + run;
        c++;
        if (p[j] < 0) run += d[j];
      }
    }
  }
  cout << ans.size() << '\n';
  for (int i : ans) cout << i << ' ';
  cout << '\n';
}
