#include #define rep(i, a) for (int i = 0; i < (a); i++) #define rep2(i, a, b) for (int i = (a); i < (b); i++) #define repr(i, a) for (int i = (a) - 1; i >= 0; i--) #define repr2(i, a, b) for (int i = (b) - 1; i >= (a); i--) using namespace std; typedef long long ll; const ll inf = 1e9; const ll mod = 1e9 + 7; const int offset = 100000; int N, a[200000]; int b[offset * 2 + 1]; int main() { cin >> N; rep (i, 2 * N) { cin >> a[i]; b[a[i] + offset]++; } sort(a, a + 2 * N); int pos = 0, neg = 0, zero = 0; // calc pos int r = N * 2 - 1; rep (i, N * 2) { if (i >= r) break; if (r > 0 && a[i] + a[r] > 0) { pos++; r--; } } // calc neg int l = 0; repr (i, N * 2) { if (l >= i) break; if (l < N * 2 - 1 && a[l] + a[i] < 0) { neg++; l++; } } ll z = 0; rep2 (i, 1, offset + 1) { z += min(b[offset + i], b[offset - i]); } z += b[offset] / 2; z = min(z, N); cout << neg << " " << pos << " " << z << endl; }