#define _USE_MATH_DEFINES #include <algorithm> #include <cstdio> #include <functional> #include <iostream> #include <cfloat> #include <climits> #include <cstring> #include <cmath> #include <fstream> #include <map> #include <queue> #include <random> #include <set> #include <sstream> #include <stack> #include <string> #include <time.h> #include <vector> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> i_i; typedef pair<ll, int> ll_i; typedef pair<double, int> d_i; typedef pair<ll, ll> ll_ll; typedef pair<double, double> d_d; struct edge { int u, v; ll w; }; ll MOD = 1000000007; ll _MOD = 1000000009; double EPS = 1e-10; int f(int N, vector<int> A) { sort(A.begin(), A.end()); int j = N - 1, cnt = 0; for (int i = 0; i < N && i < j; i++) if (A[i] + A[j] > 0) { cnt++; j--; } return cnt; } int main() { int N; cin >> N; N *= 2; vector<int> A(N); for (int i = 0; i < N; i++) cin >> A[i]; int k = 0; vector<int> a(100001), b(100001); for (int i = 0; i < N; i++) { if (A[i] == 0) k++; if (A[i] > 0) a[A[i]]++; if (A[i] < 0) b[-A[i]]++; } int moist = k / 2; for (int j = 1; j <= 100000; j++) moist += min(a[j], b[j]); int wet = f(N, A); for (int i = 0; i < N; i++) A[i] *= -1; int dry = f(N, A); cout << dry << ' ' << wet << ' ' << moist << endl; }