import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int[] arr = new int[n * 2]; for (int i = 0; i < 2 * n; i++) { arr[i] = sc.nextInt(); } int left = 0; int right = 2 * n - 1; int moist = 0; while (left < right) { if (arr[left] + arr[right] < 0) { left++; } else if (arr[left] + arr[right] > 0) { right--; } else { moist++; left++; right--; } } left = 0; right = 2 * n - 1; int dry = 0; while (left < right) { if (arr[left] + arr[right] < 0) { dry++; left++; right--; } else { right--; } } left = 0; right = 2 * n - 1; int wet = 0; while (left < right) { if (arr[left] + arr[right] > 0) { wet++; left++; right--; } else { left++; } } System.out.println(dry + " " + wet + " " + moist); } }