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;
int scan_d() {
  register int ip = getchar(), ret = 0, flag = 1;
  for (; ip < '0' || ip > '9'; ip = getchar())
    if (ip == '-') {
      flag = -1;
      ip = getchar();
      break;
    }
  for (; ip >= '0' && ip <= '9'; ip = getchar()) ret = ret * 10 + ip - '0';
  return flag * ret;
}
void print_d(int n) {
  if (n < 0) {
    n = -n;
    putchar('-');
  }
  int i = 10;
  char output_buffer[10];
  do {
    output_buffer[--i] = (n % 10) + '0';
    n /= 10;
  } while (n);
  do {
    putchar(output_buffer[i]);
  } while (++i < 10);
}
void println_d(int n) {
  if (n < 0) {
    n = -n;
    putchar('-');
  }
  int i = 10;
  char output_buffer[11];
  output_buffer[10] = '\n';
  do {
    output_buffer[--i] = (n % 10) + '0';
    n /= 10;
  } while (n);
  do {
    putchar(output_buffer[i]);
  } while (++i < 11);
}
char sp = '/';
void printsp_d(int n) {
  if (n < 0) {
    n = -n;
    putchar('-');
  }
  int i = 10;
  char output_buffer[11];
  output_buffer[10] = sp;
  do {
    output_buffer[--i] = (n % 10) + '0';
    n /= 10;
  } while (n);
  do {
    putchar(output_buffer[i]);
  } while (++i < 11);
}
inline void scan(string &ret) {
  register int a = getchar();
  ret = "";
  while (a == ' ' || a == '\n' || a == EOF) a = getchar();
  while (a != ' ' && a != '\n' && a != EOF) {
    ret += (char)a;
    a = getchar();
  }
}
vector<pair<int, int> > v;
vector<int> f;
int n;
bool sort_f(pair<int, int> i, pair<int, int> j) { return (i.first < j.first); }
bool sort_s(pair<int, int> i, pair<int, int> j) { return (j.first < i.first); }
int get_range(int i) {
  int count = 0;
  int j = i + 1;
  i = v[i].first;
  while (j < 2 * n) {
    if (v[j].first == i) {
      count++;
    } else {
      break;
    }
    j++;
  }
  return count;
}
void print(std::vector<pair<int, int> > data) {
  pair<int, int> temp;
  for (int i = 0; i < data.size(); ++i) {
    temp = data.at(i);
    printf("%d, %d\n", temp.first, temp.second);
  }
}
int main() {
  int temp;
  pair<int, int> t_pair;
  n = scan_d();
  for (int i = 0; i < 2 * n; i++) {
    temp = scan_d();
    t_pair.first = temp;
    t_pair.second = i;
    v.push_back(t_pair);
    f.push_back(-1);
  }
  sort(v.begin(), v.end(), sort_f);
  int i = 0, c_1 = 0, c_2 = 0, c_1_d = 0, c_2_d = 0;
  while (i < 2 * n) {
    temp = get_range(i);
    if (temp == 0) {
      if (c_1 > c_2) {
        f[v[i].second] = 2;
        c_2++;
        c_2_d++;
      } else {
        f[v[i].second] = 1;
        c_1++;
        c_1_d++;
      }
      i++;
    } else {
      f[v[i].second] = 1;
      i++;
      f[v[i].second] = 2;
      i = i + temp;
      c_1++;
      c_2++;
      c_1_d++;
      c_2_d++;
    }
  }
  i = 0;
  while (i < 2 * n) {
    if (f[i] == -1) {
      if (c_1 < n) {
        f[i] = 1;
        c_1++;
      } else {
        f[i] = 2;
        c_2++;
      }
    }
    i++;
  }
  println_d(c_1_d * c_2_d);
  for (i = 0; i < 2 * n - 1; i++) {
    printf("%d ", f[i]);
  }
  printf("%d\n", f[i]);
  return 0;
}