#include <bits/stdc++.h>
using namespace std;
template <class T1>
void deb(T1 e) {
  cout << e << endl;
}
template <class T1, class T2>
void deb(T1 e1, T2 e2) {
  cout << e1 << " " << e2 << endl;
}
template <class T1, class T2, class T3>
void deb(T1 e1, T2 e2, T3 e3) {
  cout << e1 << " " << e2 << " " << e3 << endl;
}
template <class T1, class T2, class T3, class T4>
void deb(T1 e1, T2 e2, T3 e3, T4 e4) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << endl;
}
template <class T1, class T2, class T3, class T4, class T5>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << endl;
}
template <class T1, class T2, class T3, class T4, class T5, class T6>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5, T6 e6) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << " " << e6
       << endl;
}
long long sqr(long long n) { return n * n; }
double LOG(long long a, long long b) { return (log(a) / log(b)); }
long long GCD(long long a, long long b) {
  if (a < 0) return GCD(-a, b);
  if (b < 0) return GCD(a, -b);
  return (!b) ? a : GCD(b, a % b);
}
long long LCM(long long a, long long b) {
  if (a < 0) return LCM(-a, b);
  if (b < 0) return LCM(a, -b);
  return (a * (b / GCD(a, b)));
}
long long BigMod(long long B, long long P, long long M) {
  if (!P) return 1;
  if (!(P % 2)) return sqr(BigMod(B, P / 2, M)) % M;
  return (B % M) * (BigMod(B, P - 1, M)) % M;
}
vector<int> res;
vector<int> nums;
int col[10];
int numType[105];
int amType[10];
int findType(int n) {
  if (n == 0) return -1;
  if (n == 100) return 4;
  stringstream ss;
  string s;
  ss << n;
  ss >> s;
  if ((int)s.size() == 2) {
    if (s[1] == '0') return 3;
    return 2;
  }
  return 1;
}
int main(void) {
  int n;
  int i, x;
  scanf("%d", &n);
  nums.clear();
  for (i = 0; i < n; i++) {
    scanf("%d", &x);
    nums.push_back(x);
  }
  sort(nums.begin(), nums.end());
  res.clear();
  memset(col, 0, sizeof(col));
  memset(numType, 0, sizeof(numType));
  memset(amType, 0, sizeof(amType));
  for (i = 0; i < (int)nums.size(); i++) {
    if (!nums[i])
      res.push_back(0);
    else {
      int tp = findType(nums[i]);
      numType[i] = tp;
      amType[tp]++;
    }
  }
  for (i = 0; i < (int)nums.size(); i++) {
    if (nums[i] == 100) {
      res.push_back(100);
      break;
    }
  }
  if (amType[1] && amType[3]) {
    for (i = 0; i < (int)nums.size(); i++) {
      if (findType(nums[i]) == 1) {
        res.push_back(nums[i]);
        break;
      }
    }
    for (i = 0; i < (int)nums.size(); i++) {
      if (findType(nums[i]) == 3) {
        res.push_back(nums[i]);
        break;
      }
    }
  } else {
    for (i = 0; i < (int)nums.size(); i++) {
      if (nums[i] && nums[i] != 100) {
        res.push_back(nums[i]);
        break;
      }
    }
  }
  sort(res.begin(), res.end());
  deb((int)res.size());
  for (i = 0; i < (int)res.size(); i++) printf("%d ", res[i]);
  printf("\n");
  return 0;
}

### Prompt

Generate a CPP solution to the following problem:

Unfortunately, Vasya can only sum pairs of integers (a, b), such that for any decimal place at least one number has digit 0 in this place. For example, Vasya can sum numbers 505 and 50, but he cannot sum 1 and 4.

Vasya has a set of k distinct non-negative integers d1, d2, ..., dk.

Vasya wants to choose some integers from this set so that he could sum any two chosen numbers. What maximal number of integers can he choose in the required manner?

Input

The first input line contains integer k (1 ≤ k ≤ 100) — the number of integers.

The second line contains k distinct space-separated integers d1, d2, ..., dk (0 ≤ di ≤ 100).

Output

In the first line print a single integer n the maximum number of the chosen integers. In the second line print n distinct non-negative integers — the required integers.

If there are multiple solutions, print any of them. You can print the numbers in any order.

Examples

Input

4
100 10 1 0


Output

4
0 1 10 100 

Input

3
2 70 3


Output

2
2 70 

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
template <class T1>
void deb(T1 e) {
  cout << e << endl;
}
template <class T1, class T2>
void deb(T1 e1, T2 e2) {
  cout << e1 << " " << e2 << endl;
}
template <class T1, class T2, class T3>
void deb(T1 e1, T2 e2, T3 e3) {
  cout << e1 << " " << e2 << " " << e3 << endl;
}
template <class T1, class T2, class T3, class T4>
void deb(T1 e1, T2 e2, T3 e3, T4 e4) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << endl;
}
template <class T1, class T2, class T3, class T4, class T5>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << endl;
}
template <class T1, class T2, class T3, class T4, class T5, class T6>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5, T6 e6) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << " " << e6
       << endl;
}
long long sqr(long long n) { return n * n; }
double LOG(long long a, long long b) { return (log(a) / log(b)); }
long long GCD(long long a, long long b) {
  if (a < 0) return GCD(-a, b);
  if (b < 0) return GCD(a, -b);
  return (!b) ? a : GCD(b, a % b);
}
long long LCM(long long a, long long b) {
  if (a < 0) return LCM(-a, b);
  if (b < 0) return LCM(a, -b);
  return (a * (b / GCD(a, b)));
}
long long BigMod(long long B, long long P, long long M) {
  if (!P) return 1;
  if (!(P % 2)) return sqr(BigMod(B, P / 2, M)) % M;
  return (B % M) * (BigMod(B, P - 1, M)) % M;
}
vector<int> res;
vector<int> nums;
int col[10];
int numType[105];
int amType[10];
int findType(int n) {
  if (n == 0) return -1;
  if (n == 100) return 4;
  stringstream ss;
  string s;
  ss << n;
  ss >> s;
  if ((int)s.size() == 2) {
    if (s[1] == '0') return 3;
    return 2;
  }
  return 1;
}
int main(void) {
  int n;
  int i, x;
  scanf("%d", &n);
  nums.clear();
  for (i = 0; i < n; i++) {
    scanf("%d", &x);
    nums.push_back(x);
  }
  sort(nums.begin(), nums.end());
  res.clear();
  memset(col, 0, sizeof(col));
  memset(numType, 0, sizeof(numType));
  memset(amType, 0, sizeof(amType));
  for (i = 0; i < (int)nums.size(); i++) {
    if (!nums[i])
      res.push_back(0);
    else {
      int tp = findType(nums[i]);
      numType[i] = tp;
      amType[tp]++;
    }
  }
  for (i = 0; i < (int)nums.size(); i++) {
    if (nums[i] == 100) {
      res.push_back(100);
      break;
    }
  }
  if (amType[1] && amType[3]) {
    for (i = 0; i < (int)nums.size(); i++) {
      if (findType(nums[i]) == 1) {
        res.push_back(nums[i]);
        break;
      }
    }
    for (i = 0; i < (int)nums.size(); i++) {
      if (findType(nums[i]) == 3) {
        res.push_back(nums[i]);
        break;
      }
    }
  } else {
    for (i = 0; i < (int)nums.size(); i++) {
      if (nums[i] && nums[i] != 100) {
        res.push_back(nums[i]);
        break;
      }
    }
  }
  sort(res.begin(), res.end());
  deb((int)res.size());
  for (i = 0; i < (int)res.size(); i++) printf("%d ", res[i]);
  printf("\n");
  return 0;
}

```