#define _USE_MATH_DEFINES #define _CRT_SECURE_NO_DEPRECATE #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair Pii; typedef pair Pll; #define FOR(i,n) for(int i = 0; i < (n); i++) #define sz(c) ((int)(c).size()) #define ten(x) ((int)1e##x) #define tenll(x) ((ll)1e##x) // #pragma comment(linker,"/STACK:36777216") template T gcd(T a, T b) { return b ? gcd(b, a % b) : a; } template void chmax(T& l, const T r) { l = max(l, r); } template void chmin(T& l, const T r) { l = min(l, r); } int get_dry(vector x){ sort(x.begin(), x.end()); int ans = 0; int r = sz(x) - 1; FOR(i, sz(x)){ if (x[i] >= 0) break; while (r > i && x[i] + x[r] >= 0) r--; if (r <= i) break; ans++; r--; } return ans; } int main() { int n; cin >> n; vector a(2 * n); FOR(i,2*n) scanf("%d", &a[i]); int dry = get_dry(a); FOR(i, 2 * n) a[i] *= -1; int wet = get_dry(a); static int t[ten(5) + 10] = {}; int zeros = 0; vector mus; for (auto x : a) { if (x < 0) mus.push_back(-x); else if (x == 0)zeros++; else t[x]++; } // int moist = zeros / 2; int moist = 0; for (auto x : mus) { if (t[x]) { moist++; t[x]--; } } printf("%d %d %d\n", dry, wet, moist); return 0; }