#include<bits/stdc++.h>
using namespace std;
 
int main() {
        int n,a[110],c = 0,x,y;
        cin>>n;
        for(int i = 1; i <= n; i++) {
            cin>>a[i];
        }
        cin>>x>>y;
 
        sort(a+1,a+1+n);
        reverse(a+1,a+1+n);
 
        for(int i = 1; i <= n; i++) {
            if(a[i] >= x && a[i] <= y) {
                cout<<a[i]<<" ";
                c++;
            }
        }
 
        cout<<endl;
        cout<<c;
}
/**************************************************************
	Problem: 2083
	User: linzihang
	Language: C++
	Result: Accepted
	Time:48 ms
	Memory:2076 kb
****************************************************************/