#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ll long long
using namespace __gnu_pbds;
using namespace std;
template <class T>
using ordered_set = tree<T , null_type , less<T> , rb_tree_tag , tree_order_statistics_node_update>;
template <class T>
using ordered_set1 = tree<T , null_type , greater<T> , rb_tree_tag , tree_order_statistics_node_update>;
// less<T>/greater<T> = ascending/descending.
// less_equal<>/greater_equal<> for ordered multiset
// ordered_multiset note : s.find(), s.erase() don't work + s.upper_bound() and s.lower_bound() swap jobs;
void fastIO(void) {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    //freopen("stdin", "r", stdin);
    //freopen("stdout", "w", stdout);
}
struct animal{
    ll index;
    ll prednum;
    ll preynum;
    ll power;
};
bool cmp(animal x,ll b){
    return x.power < b;
}
bool cmp3(animal x, animal y) {
    return x.power < y.power;
}
bool cmp4(animal x, animal y) {
    return x.index < y.index;
}
int main() {
    fastIO();
    ll n,a,b; cin>>n>>a>>b;
    vector<animal> v(n);
    for (ll i = 0; i<n; i++) {
        cin>>v[i].power;
        v[i].index=i;
    }
    sort(v.begin(),v.end(),cmp3);
    for (ll i = 0; i<n; i++) {
        //pred
        auto predL = lower_bound(v.begin(),v.end(),v[i].power+a,cmp);
        auto predR = lower_bound(v.begin(),v.end(),v[i].power+b,cmp);
        v[i].prednum=predR-predL;
        //prey
        if (a>=v[i].power) {
            v[i].preynum=0;
            continue;
        }
        else {
            auto preyR = lower_bound(v.begin(),v.end(),v[i].power-a,cmp);
            if (preyR!=v.end() && v[preyR-v.begin()].power==v[i].power-a) preyR++;
            auto preyL = lower_bound(v.begin(),v.end(),v[i].power-b,cmp);
            if (preyL!=v.end() && v[preyL-v.begin()].power==v[i].power-b) preyL++;
            v[i].preynum=preyR-preyL;
        }
    }
    sort(v.begin(),v.end(),cmp4);
    for (ll i = 0; i<n; i++) {
        cout<<v[i].prednum<<' '<<v[i].preynum<<'\n';
    }
}
