#include #include #include #include using namespace std; int main(){ int n;cin>>n;n*=2; vector A(n); map B; for(int i = 0; n > i; i++){ cin>>A[i]; B[A[i]]++; } sort(A.begin(), A.end()); int nw = n-1; int dry = 0; for(int i = 0; i < nw ; i++){ while(i < nw && A[i]+A[nw] >= 0)nw--; if(i < nw)dry++; nw--; } nw = 0; int wet = 0; for(int i = n-1; nw < i; i--){ while(nw < i && A[nw]+A[i] <= 0)nw++; if(nw < i)wet++; nw++; } int moist = 0; for(auto x: B){ if(x.first < 0)continue; moist += min(x.second, B[-x.first]); } cout << dry << " " << wet << " " << moist << endl; }