#include #include #include #include #define repeat(i,n) for (int i = 0; (i) < (n); ++(i)) #define whole(f,x,...) ([&](decltype((x)) whole) { return (f)(begin(whole), end(whole), ## __VA_ARGS__); })(x) using namespace std; template T input(istream & in) { T a; in >> a; return a; } int foo(vector const & a) { int cnt = 0; for (int i = 0, j = a.size() - 1; i < j; ++ i, -- j) { while (i < j and a[i] + a[j] >= 0) -- j; if (i == j) break; ++ cnt; } return cnt; } int bar(vector const & xs) { map f, g; int zero = 0; for (int x : xs) { if (x > 0) { f[x] += 1; } else if (x < 0) { g[- x] += 1; } else { zero += 1; } } int cnt = 0; for (auto it : f) cnt += min(it.second, g[it.first]); cnt += zero/2; return cnt; } int main() { int n; cin >> n; vector a(2*n); repeat (i,2*n) cin >> a[i]; whole(sort, a); int dry = foo(a); int moist = bar(a); repeat (i,2*n) a[i] *= -1; whole(reverse, a); int wet = foo(a); cout << dry << ' ' << wet << ' ' << moist << endl; return 0; }