#include #define ll long long #define INF 1000000005 #define MOD 1000000007 #define EPS 1e-10 #define rep(i,n) for(int i=0;i<(int)n;++i) #define each(a, b) for(auto (a): (b)) #define all(v) (v).begin(),(v).end() #define fi first #define se second #define pb push_back #define show(x) cout <<#x<<" = "<<(x)<P; const int MAX_N = 100005; map mp; int main() { int n; cin >> n; vector vec(n); rep(i,2*n){ cin >> vec[i]; mp[vec[i]]++; } multiset st; rep(i,2*n){ st.insert(vec[i]); } int ans1 = 0; while(st.size() > 0){ int a = *st.begin(); if(a >= 0){ break; } auto it = st.lower_bound(-a); it--; if(it != st.begin()){ st.erase(it); st.erase(st.begin()); ans1++; }else{ break; } } int ans2 = 0; rep(i,100001){ ans2 += min(mp[i],mp[-i]); } st.clear(); rep(i,2*n){ st.insert(vec[i]); } int ans3 = 0; while(st.size() > 0){ auto it = st.end(); it--; int a = *it; if(a <= 0){ break; } it = st.upper_bound(-a); it++; if(it != st.end()){ it--; st.erase(it); it = st.end(); it--; st.erase(it); ans3++; }else{ break; } } cout << ans1 << " " << ans3 << " " << ans2 << "\n"; abort(); return 0; }