Problem: Valera has 2·n cubes, each cube contains an integer from 10 to 99. He arbitrarily chooses n cubes and puts them in the first heap. The remaining cubes form the second heap. 

Valera decided to play with cubes. During the game he takes a cube from the first heap and writes down the number it has. Then he takes a cube from the second heap and write out its two digits near two digits he had written (to the right of them). In the end he obtained a single fourdigit integer — the first two digits of it is written on the cube from the first heap, and the second two digits of it is written on the second cube from the second heap.

Valera knows arithmetic very well. So, he can easily count the number of distinct fourdigit numbers he can get in the game. The other question is: how to split cubes into two heaps so that this number (the number of distinct fourdigit integers Valera can get) will be as large as possible?

Input

The first line contains integer n (1 ≤ n ≤ 100). The second line contains 2·n space-separated integers ai (10 ≤ ai ≤ 99), denoting the numbers on the cubes.

Output

In the first line print a single number — the maximum possible number of distinct four-digit numbers Valera can obtain. In the second line print 2·n numbers bi (1 ≤ bi ≤ 2). The numbers mean: the i-th cube belongs to the bi-th heap in your division.

If there are multiple optimal ways to split the cubes into the heaps, print any of them.

Examples

Input

1
10 99


Output

1
2 1 


Input

2
13 24 13 45


Output

4
1 2 2 1 

Note

In the first test case Valera can put the first cube in the first heap, and second cube — in second heap. In this case he obtain number 1099. If he put the second cube in the first heap, and the first cube in the second heap, then he can obtain number 9910. In both cases the maximum number of distinct integers is equal to one.

In the second test case Valera can obtain numbers 1313, 1345, 2413, 2445. Note, that if he put the first and the third cubes in the first heap, he can obtain only two numbers 1324 and 1345.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
void sf(int &x) { scanf("%d", &x); }
void sf(long long &x) { scanf("%lld", &x); }
void sf(long long &x, long long &y) { scanf("%lld%lld", &x, &y); }
void sf(float &x) { scanf("%f", &x); }
void sf(double &x) { scanf("%lf", &x); }
void sf(int &x, int &y) { scanf("%d%d", &x, &y); }
void sf(float &x, float &y) { scanf("%f%f", &x, &y); }
void sf(double &x, double &y) { scanf("%lf%lf", &x, &y); }
void sf(double &x, double &y, double &z) { scanf("%lf%lf%lf", &x, &y, &z); }
void sf(int &x, int &y, int &z) { scanf("%d%d%d", &x, &y, &z); }
void sf(long long &x, long long &y, long long &z) {
  scanf("%lld%lld%lld", &x, &y, &z);
}
void sf(float &x, float &y, float &z) { scanf("%u%u%u", &x, &y, &z); }
void sf(char &x) { x = getchar(); }
void sf(char *s) { scanf("%s", s); }
void sf(string &s) { cin >> s; }
void pf(int x) { printf("%d\n", x); }
void pf(int x, int y) { printf("%d %d\n", x, y); }
void pf(int x, int y, int z) { printf("%d %d %d\n", x, y, z); }
void pf(long long x) { printf("%lld\n", x); }
void pf(long long x, long long y) { printf("%lld %lld\n", x, y); }
void pf(long long x, long long y, long long z) {
  printf("%lld %lld %lld\n", x, y, z);
}
void pf(float x) { printf("%u\n", x); }
void pf(double x) { printf("%.7lf\n", x); }
void pf(double x, double y) { printf("%.5lf %.5lf\n", x, y); }
void pf(char x) { printf("%c\n", x); }
void pf(char *x) { printf("%s\n", x); }
void pf(string x) {
  cout << x;
  puts("");
}
long long STN(string s) {
  long long sm;
  stringstream ss(s);
  ss >> sm;
  return sm;
}
template <class T>
T bigmod(T b, T p, T m) {
  if (p == 0) return 1 % m;
  T x = b;
  T ans = 1;
  while (p) {
    if (p & 1) ans = (ans * x) % m;
    p >>= 1;
    x = (x * x) % m;
  }
  return ans;
}
template <class T>
T gcd(T x, T y) {
  if (y == 0) return x;
  return gcd(y, x % y);
}
template <typename T>
T POW(T b, T p) {
  if (p == 0) return 1;
  if (p == 1) return b;
  if (p % 2 == 0) {
    T s = POW(b, p / 2);
    return s * s;
  }
  return b * POW(b, p - 1);
}
template <typename T>
T modinv(T num, T m) {
  return bigmod(num, m - 2, m);
}
template <class T>
string NTS(T Number) {
  stringstream ss;
  ss << Number;
  return ss.str();
}
int n, a[209];
vector<int> v[109];
bool b[109], c[109];
int main() {
  sf(n);
  for (int i = 1; i <= n * 2; i++) {
    int aa;
    sf(aa);
    v[aa].push_back(i);
  }
  int k = n * 2, an = n, bn = n;
  bool f = 0;
  int ab = 1000;
  while (ab--) {
    bool ff = 0;
    for (int i = 10; i < 100; i++) {
      if (f == 0 && b[i] == 0 && !v[i].empty()) {
        a[v[i].back()] = 1;
        if (bn) f = 1;
        b[i] = 1;
        ff = 1;
        an--;
        k--;
        v[i].pop_back();
        break;
      } else if (f == 1 && c[i] == 0 && !v[i].empty()) {
        a[v[i].back()] = 2;
        if (an) f = 0;
        c[i] = 1;
        ff = 1;
        bn--;
        k--;
        v[i].pop_back();
        break;
      }
    }
  }
  int bb = an;
  for (int i = 10; i < 100 && bb; i++) {
    while (bb && !v[i].empty()) {
      bb--;
      a[v[i].back()] = 1;
      v[i].pop_back();
    }
  }
  bb = bn;
  for (int i = 10; i < 100 && bb; i++) {
    while (bb && !v[i].empty()) {
      bb--;
      a[v[i].back()] = 2;
      v[i].pop_back();
    }
  }
  an = n - an;
  bn = n - bn;
  pf(an * bn);
  for (int i = 1; i <= n * 2; i++) {
    cout << a[i] << " ";
  }
  return 0;
}