#include <bits/stdc++.h>
const int INF = 1 << 29;
using namespace std;
void put(int i) {
  cout << (i == 0 ? 0 : i);
  exit(0);
}
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(NULL);
  ;
  int n, x, y;
  cin >> n;
  vector<int> v(n), sum(n);
  for (int i = 0; i < n; ++i) {
    cin >> v[i];
    if (!i)
      sum[i] = v[i];
    else
      sum[i] = sum[i - 1] + v[i];
  }
  cin >> x >> y;
  for (int i = 1; i < n; ++i) {
    int p1 = sum[i - 1];
    int p2 = sum[n - 1] - sum[i - 1];
    if (p1 >= x && p1 <= y && p2 >= x && p2 <= y) put(i + 1);
  }
  put(0);
  return 0;
}
