#include <bits/stdc++.h>

#define F first
#define S second
#define pb push_back
#define ld  double
#define ll long long
//#define int long long

using namespace std;

typedef complex<double> point ;

const int MAXN = 1<<21 , LG = 21 ;

const ld PI = acos(-1) ;

point a[MAXN] ;

void fft(point a[] , int inv )
{
    for(int i = 0 ; i < MAXN;  i ++ )
    {
        int j = 0 ;
        for(int k = 0 ; k < LG ; k ++ )
            if(i&(1<<k))
                j += (1<<(LG-k-1)) ;
        if(j<i)
            swap(a[i],a[j]) ;
    }

    for(int l = 2 ; l <= MAXN ; l *= 2)
    {
        point wn(cos(2.*PI/l),inv*sin(2.*PI/l)) ;
        for(int i = 0 ; i < MAXN ; i += l )
        {
            point w(1.,0.) ;
            for(int j = 0 ; j < l / 2 ; j ++ )
            {
                point p1 = a[i+j] + w * a[i+j+l/2] ;
                point p2 = a[i+j] - w * a[i+j+l/2] ;
                a[i+j] = p1 ;
                a[i+j+l/2] = p2 ;
                w *= wn ;
            }
        }
    }
    if(inv==-1)
        for(int i = 0 ; i < MAXN ; i ++ )
            a[i] /= MAXN ;
}

bool mark[MAXN] ;

int32_t main()
{
    ios::sync_with_stdio(0) ; cin.tie(0) ;
    int n , m ;
    cin >> n >> m ;
    for(int i = 0 ; i < n ; i ++ )
    {
        int x ;
        cin >> x ;
        mark[x] = 1 ;
        a[x] = point(1.,0.);
    }
    fft(a,1) ;
    for(int i = 0 ; i < MAXN ; i ++ )
        a[i] *= a[i] ;
    fft(a,-1) ;
    for(int i = 0 ; i <= m ; i ++ )
        if(!mark[i]&&a[i].real()>0.5)
            return cout << "NO" , 0 ;
    vector<int> ans ;
    for(int i = 0 ; i <= m ; i ++ )
        if(mark[i]&&a[i].real()<0.5)
            ans.pb(i) ;
    cout << "YES" << endl ;
    cout << ans.size() << '\n' ;
    for(auto u : ans )
     cout << u << ' ' ;
     cout << endl ;
}


#include<iostream>
#include<cstring>
#include<cstdlib>
#include<cstdio>
#include<algorithm>
#define ll long long
#define MOD(x) ((x)>=mod?((x)-mod):(x))
using namespace std;
const int maxn=1<<21, inf=1e9+233, mod=998244353;
int n, m, N, x;
int a[maxn], w[maxn], flag[maxn], ans[maxn];

template<typename T>
inline void read(T &k)
{
	int f=1; k=0; char c=getchar();
	while(c<'0' || c>'9') c=='-' && (f=-1), c=getchar();
	while(c<='9' && c>='0') k=k*10+c-'0', c=getchar();
	k*=f;
}

inline int power(int a, int b)
{
	int ans=1;
	for(;b;b>>=1, a=1ll*a*a%mod)
	if(b&1) ans=1ll*a*ans%mod;
	return ans;
}

inline void ntt(int *a, int f)
{
	for(int i=0, j=0;i<N;i++)
	{
		if(i<j) swap(a[i], a[j]);
		for(int k=N>>1;(j^=k)<k;k>>=1);
	}
	for(int i=2;i<=N;i<<=1)
	{
		int m=i>>1, base=power(3, (mod-1)/i);
		if(f==-1) base=power(base, mod-2);
		w[0]=1; for(int j=1;j<m;j++) w[j]=1ll*w[j-1]*base%mod;
		for(int j=0;j<N;j+=i)
		{
			for(int k=0;k<m;k++)
			{
				int t=1ll*a[j+k+m]*w[k]%mod;
				a[j+k+m]=MOD(a[j+k]-t+mod);
				a[j+k]=MOD(a[j+k]+t);
			}
		}
	}
	if(f==-1) for(int i=0, inv=power(N, mod-2);i<N;i++) a[i]=1ll*a[i]*inv%mod;
}

int main()
{
	read(n); read(m); m++;
	for(int i=1;i<=n;i++) read(x), flag[x]=a[x]=1;
	for(N=1;N<(m<<1);N<<=1);
	ntt(a, 1);
	for(int i=0;i<N;i++) a[i]=1ll*a[i]*a[i]%mod;
	ntt(a, -1);
	for(int i=0;i<m;i++) if(a[i] && !flag[i]) return puts("NO"), 0;
	puts("YES");
	for(int i=0;i<m;i++) if(flag[i] && !a[i]) ans[++ans[0]]=i;
	printf("%d\n", ans[0]);
	for(int i=1;i<=ans[0];i++) printf("%d ", ans[i]);
}


//(c)Alex_2oo8

#include <bits/stdc++.h>

namespace dadawodjawidawjdioawjfojaiowfja {

template<int MOD>
class Modular {
  static constexpr int R = Modular<MOD>::compute_r();
  static constexpr int N_inverse = Modular<MOD>::compute_inverse();
  static constexpr int R_power = Modular<MOD>::compute_r_power();
  static constexpr int R_inverse = Modular<MOD>::compute_r_inverse();

  int encoded_value;

  static constexpr int compute_r();
  static constexpr int compute_inverse();
  static constexpr int compute_r_power();
  static constexpr int compute_r_inverse();

public:
  Modular ( int x );
  Modular () : encoded_value(0) { }
  inline Modular<MOD> operator + ( const Modular<MOD>& foo ) const;
  inline Modular<MOD> operator - ( const Modular<MOD>& foo ) const;
  inline Modular<MOD> operator * ( const Modular<MOD>& foo ) const;
  int get_value() const;

  int debug() const;

};

/* CONTEXPR */

template<int MOD>
constexpr int Modular<MOD>::compute_r() {
  int r = 1;
  while ( r < MOD ) r *= 2;
  return r;
}

template<int MOD>
constexpr int Modular<MOD>::compute_r_inverse() {
  int r = compute_r();

  int res = 1;
  int pow = MOD - 2; //TODO constexpr euler_phi

  while ( pow > 0 ) {
    if ( pow % 2 == 1 )
      res = ( res * 1LL * r ) % MOD;
      r = ( r * 1LL * r ) % MOD;
      pow /= 2;
  }

  return res;
}

template<int MOD>
constexpr int Modular<MOD>::compute_r_power() {
  int r = compute_r();
  int res = 0;
  while ( r > 1 ) {
    r /= 2;
    res += 1;
  }
  return res;
}

template<int MOD>
constexpr int Modular<MOD>::compute_inverse() {
  int r = compute_r();
  int N = MOD;
  int pow = r / 2 - 1;
  int res = 1;
  while ( pow > 0 ) {
    res = ( res * 1LL * N ) & ( r - 1 );
    N = ( N * 1LL * N ) & ( r - 1 );
    pow /= 2;
  }
  return res;
}

/* CLASS */

template<int MOD>
Modular<MOD>::Modular( int x ) {
  encoded_value = ( x * 1LL * R ) % MOD;
}

template<int MOD>
inline Modular<MOD> Modular<MOD>::operator + ( const Modular& foo ) const {
  Modular<MOD> nw;
  nw.encoded_value = ( encoded_value + foo.encoded_value );
  if ( nw.encoded_value >= MOD ) nw.encoded_value -= MOD;
  return nw;
}

template<int MOD>
inline Modular<MOD> Modular<MOD>::operator - ( const Modular& foo ) const {
  Modular<MOD> nw;
  nw.encoded_value = ( encoded_value - foo.encoded_value );
  if ( nw.encoded_value < 0 ) nw.encoded_value += MOD;
  return nw;
}

/* LOOKS OK */
template<int MOD>
inline Modular<MOD> Modular<MOD>::operator * ( const Modular& foo ) const {
  Modular<MOD> nw;

  unsigned long long AB_prim = encoded_value * 1ULL * foo.encoded_value;
  long long up = (N_inverse * AB_prim ) & (R-1);

  up = up * MOD;

  AB_prim -= up;

  nw.encoded_value = AB_prim >> R_power;
  if ( nw.encoded_value < 0 ) nw.encoded_value += MOD;

  return nw;
}

template<int MOD>
int Modular<MOD>::get_value() const {
  return ( encoded_value * 1LL * R_inverse ) % MOD;
}

template<int MOD>
int Modular<MOD>::debug() const {
  return ( encoded_value );
}

}

using namespace std;
using namespace dadawodjawidawjdioawjfojaiowfja;

const int MX = (1 << 23); // should be at least 2 * n, a power of two
const int md = 998244353; // prime and of form 2^k * x + 1, where 2^k >= MX
const Modular<md> root = 31;      // MX-th root of unity modulo md

Modular<md> pow(Modular<md> x, int p) {
	Modular<md> r = 1;
	while (p) {
		if (p % 2 == 1) r = r * x;
		x = x * x;
		p /= 2;
	}
	return r;
}

int norm_pow(int x, int p) {
  int r = 1;
  while (p) {
		if (p % 2 == 1) r = (r * 1LL * x) % md;
		x = (x * 1LL * x) % md;
		p /= 2;
	}
	return r;
}

int rev[MX];

// init() must be called before any calls to fft() with exactly
// the same value of n, which must be a power of two!
void init(int n) {
	int log_n = 0;
	while ((n >> log_n) > 1) log_n++;

	for (int i = 0; i < n; i++) {
		rev[i] = 0;
		for (int j = 0; j < log_n; j++)
			rev[i] |= (i >> j & 1) << (log_n - 1 - j);

		if (rev[i] < i) rev[i] = i;
	}
}

void fft(Modular<md> a[], int n, bool invert) {
	static Modular<md> w_pow[MX];
	for (int i = 0; i < n; i++) swap(a[i], a[rev[i]]);
	for (int len = 1; len < n; len *= 2) {
		w_pow[0] = 1;
		w_pow[1] = pow(root, MX / (2 * len));
		if (invert) w_pow[1] = pow(w_pow[1], md - 2);
		for (int i = 2; i < len; i++) w_pow[i] = w_pow[i - 1] * w_pow[1];
		for (int i = 0; i < n; i += 2 * len)
			for (int j = i, k = i + len; j < i + len; j++, k++) {
				Modular<md> t = a[k] * w_pow[j - i], u = a[j];
				a[k] = u - t;
				a[j] = u + t;
			}
	}
	if (invert) {
		Modular<md> n_inv = norm_pow(n, md - 2);
		for (int i = 0; i < n; i++) a[i] = a[i] * n_inv;
	}
}

const int MAX = (1 << 21);

Modular<md> a[MAX], b[MAX];

int main() {
	int n, m;
	ignore = scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) {
		int x;
		ignore = scanf("%d", &x);
		a[x] = b[x] = 1;
	}

	init(MAX);
	fft(a, MAX, false);
	for (int i = 0; i < MAX; i++) a[i] = a[i] * a[i];
	fft(a, MAX, true);

	vector<int> ans;
	for (int i = 1; i <= m; i++) {
		int c = min(a[i].get_value(), 1);
		if (b[i].get_value() == c) continue;
		if (c == 1) {
			printf("NO\n");
			return 0;
		}
		ans.push_back(i);
	}

	printf("YES\n%d\n", (int)ans.size());
	for (int x : ans) printf("%d ", x);
	printf("\n");

	return 0;
}


//(c)Alex_2oo8

#include <bits/stdc++.h>

namespace dadawodjawidawjdioawjfojaiowfja {

template<int MOD>
class Modular {
  static constexpr int R = Modular<MOD>::compute_r();
  static constexpr int N_inverse = Modular<MOD>::compute_inverse();
  static constexpr int R_power = Modular<MOD>::compute_r_power();
  static constexpr int R_inverse = Modular<MOD>::compute_r_inverse();

  int encoded_value;

  static constexpr int compute_r();
  static constexpr int compute_inverse();
  static constexpr int compute_r_power();
  static constexpr int compute_r_inverse();

public:
  Modular ( int x );
  Modular () : encoded_value(0) { }
  inline Modular<MOD> operator + ( const Modular<MOD>& foo ) const;
  inline Modular<MOD> operator - ( const Modular<MOD>& foo ) const;
  inline Modular<MOD> operator * ( const Modular<MOD>& foo ) const;
  int get_value() const;

  int debug() const;

};

/* CONTEXPR */

template<int MOD>
constexpr int Modular<MOD>::compute_r() {
  int r = 1;
  while ( r < MOD ) r *= 2;
  return r;
}

template<int MOD>
constexpr int Modular<MOD>::compute_r_inverse() {
  int r = compute_r();

  int res = 1;
  int pow = MOD - 2; //TODO constexpr euler_phi

  while ( pow > 0 ) {
    if ( pow % 2 == 1 )
      res = ( res * 1LL * r ) % MOD;
      r = ( r * 1LL * r ) % MOD;
      pow /= 2;
  }

  return res;
}

template<int MOD>
constexpr int Modular<MOD>::compute_r_power() {
  int r = compute_r();
  int res = 0;
  while ( r > 1 ) {
    r /= 2;
    res += 1;
  }
  return res;
}

template<int MOD>
constexpr int Modular<MOD>::compute_inverse() {
  int r = compute_r();
  int N = MOD;
  int pow = r / 2 - 1;
  int res = 1;
  while ( pow > 0 ) {
    res = ( res * 1LL * N ) & ( r - 1 );
    N = ( N * 1LL * N ) & ( r - 1 );
    pow /= 2;
  }
  return res;
}

/* CLASS */

template<int MOD>
Modular<MOD>::Modular( int x ) {
  encoded_value = ( x * 1LL * R ) % MOD;
}

template<int MOD>
inline Modular<MOD> Modular<MOD>::operator + ( const Modular& foo ) const {
  Modular<MOD> nw;
  nw.encoded_value = ( encoded_value + foo.encoded_value );
  if ( nw.encoded_value >= MOD ) nw.encoded_value -= MOD;
  return nw;
}

template<int MOD>
inline Modular<MOD> Modular<MOD>::operator - ( const Modular& foo ) const {
  Modular<MOD> nw;
  nw.encoded_value = ( encoded_value - foo.encoded_value );
  if ( nw.encoded_value < 0 ) nw.encoded_value += MOD;
  return nw;
}

/* LOOKS OK */
template<int MOD>
inline Modular<MOD> Modular<MOD>::operator * ( const Modular& foo ) const {
  Modular<MOD> nw;

  long long AB_prim = encoded_value * 1LL * foo.encoded_value;
  long long up = (N_inverse * (AB_prim & ( R-1) ) ) & (R-1);

  up = up * MOD;

  AB_prim -= up;

  nw.encoded_value = AB_prim >> R_power;
  if ( nw.encoded_value < 0 ) nw.encoded_value += MOD;

  return nw;
}

template<int MOD>
int Modular<MOD>::get_value() const {
  return ( encoded_value * 1LL * R_inverse ) % MOD;
}

template<int MOD>
int Modular<MOD>::debug() const {
  return ( encoded_value );
}

}

using namespace std;
using namespace dadawodjawidawjdioawjfojaiowfja;

const int MX = (1 << 23); // should be at least 2 * n, a power of two
const int md = 998244353; // prime and of form 2^k * x + 1, where 2^k >= MX
const Modular<md> root = 31;      // MX-th root of unity modulo md

Modular<md> pow(Modular<md> x, int p) {
	Modular<md> r = 1;
	while (p) {
		if (p % 2 == 1) r = r * x;
		x = x * x;
		p /= 2;
	}
	return r;
}

int rev[MX];

// init() must be called before any calls to fft() with exactly
// the same value of n, which must be a power of two!
void init(int n) {
	int log_n = 0;
	while ((n >> log_n) > 1) log_n++;

	for (int i = 0; i < n; i++) {
		rev[i] = 0;
		for (int j = 0; j < log_n; j++)
			rev[i] |= (i >> j & 1) << (log_n - 1 - j);

		if (rev[i] < i) rev[i] = i;
	}
}

void fft(Modular<md> a[], int n, bool invert) {
	static Modular<md> w_pow[MX];
	for (int i = 0; i < n; i++) swap(a[i], a[rev[i]]);
	for (int len = 1; len < n; len *= 2) {
		w_pow[0] = 1;
		w_pow[1] = pow(root, MX / (2 * len));
		if (invert) w_pow[1] = pow(w_pow[1], md - 2);
		for (int i = 2; i < len; i++) w_pow[i] = w_pow[i - 1] * w_pow[1];
		for (int i = 0; i < n; i += 2 * len)
			for (int j = i, k = i + len; j < i + len; j++, k++) {
				Modular<md> t = a[k] * w_pow[j - i], u = a[j];
				a[k] = u - t;
				a[j] = u + t;
			}
	}
	if (invert) {
		int n_inv = pow(n, md - 2);
		for (int i = 0; i < n; i++) a[i] = a[i] * n_inv;
	}
}

const int MAX = (1 << 21);

Modular<md> a[MAX], b[MAX];

int main() {
	int n, m;
	ignore = scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) {
		int x;
		ignore = scanf("%d", &x);
		a[x] = b[x] = 1;
	}

	init(MAX);
	fft(a, MAX, false);
	for (int i = 0; i < MAX; i++) a[i] = a[i] * a[i];
	fft(a, MAX, true);

	vector<int> ans;
	for (int i = 1; i <= m; i++) {
		int c = min(a[i].get_value(), 1);
		if (b[i].get_value() == c) continue;
		if (c == 1) {
			printf("NO\n");
			return 0;
		}
		ans.push_back(i);
	}

	printf("YES\n%d\n", (int)ans.size());
	for (int x : ans) printf("%d ", x);
	printf("\n");

	return 0;
}


//(c)Alex_2oo8

#include <bits/stdc++.h>

namespace dadawodjawidawjdioawjfojaiowfja {

template<int MOD>
class Modular {
  static constexpr int R = Modular<MOD>::compute_r();
  static constexpr int N_inverse = Modular<MOD>::compute_inverse();
  static constexpr int R_power = Modular<MOD>::compute_r_power();
  static constexpr int R_inverse = Modular<MOD>::compute_r_inverse();

  int encoded_value;

  static constexpr int compute_r();
  static constexpr int compute_inverse();
  static constexpr int compute_r_power();
  static constexpr int compute_r_inverse();

public:
  Modular ( int x );
  Modular () : encoded_value(0) { }
  inline Modular<MOD> operator + ( const Modular<MOD>& foo ) const;
  inline Modular<MOD> operator - ( const Modular<MOD>& foo ) const;
  inline Modular<MOD> operator * ( const Modular<MOD>& foo ) const;
  int get_value() const;

  int debug() const;

};

/* CONTEXPR */

template<int MOD>
constexpr int Modular<MOD>::compute_r() {
  int r = 1;
  while ( r < MOD ) r *= 2;
  return r;
}

template<int MOD>
constexpr int Modular<MOD>::compute_r_inverse() {
  int r = compute_r();

  int res = 1;
  int pow = MOD - 2; //TODO constexpr euler_phi

  while ( pow > 0 ) {
    if ( pow % 2 == 1 )
      res = ( res * 1LL * r ) % MOD;
      r = ( r * 1LL * r ) % MOD;
      pow /= 2;
  }

  return res;
}

template<int MOD>
constexpr int Modular<MOD>::compute_r_power() {
  int r = compute_r();
  int res = 0;
  while ( r > 1 ) {
    r /= 2;
    res += 1;
  }
  return res;
}

template<int MOD>
constexpr int Modular<MOD>::compute_inverse() {
  int r = compute_r();
  int N = MOD;
  int pow = r / 2 - 1;
  int res = 1;
  while ( pow > 0 ) {
    res = ( res * 1LL * N ) & ( r - 1 );
    N = ( N * 1LL * N ) & ( r - 1 );
    pow /= 2;
  }
  return res;
}

/* CLASS */

template<int MOD>
Modular<MOD>::Modular( int x ) {
  encoded_value = ( x * 1LL * R ) % MOD;
}

template<int MOD>
inline Modular<MOD> Modular<MOD>::operator + ( const Modular& foo ) const {
  Modular<MOD> nw;
  nw.encoded_value = ( encoded_value + foo.encoded_value );
  if ( nw.encoded_value >= MOD ) nw.encoded_value -= MOD;
  return nw;
}

template<int MOD>
inline Modular<MOD> Modular<MOD>::operator - ( const Modular& foo ) const {
  Modular<MOD> nw;
  nw.encoded_value = ( encoded_value - foo.encoded_value );
  if ( nw.encoded_value < 0 ) nw.encoded_value += MOD;
  return nw;
}

/* LOOKS OK */
template<int MOD>
inline Modular<MOD> Modular<MOD>::operator * ( const Modular& foo ) const {
  Modular<MOD> nw;

  unsigned long long AB_prim = encoded_value * 1ULL * foo.encoded_value;
  long long up = ((unsigned int)N_inverse * (unsigned int)AB_prim ) & (R-1);

  up = up * MOD;

  AB_prim -= up;

  nw.encoded_value = AB_prim >> R_power;
  if ( nw.encoded_value < 0 ) nw.encoded_value += MOD;

  return nw;
}

template<int MOD>
int Modular<MOD>::get_value() const {
  return ( encoded_value * 1LL * R_inverse ) % MOD;
}

template<int MOD>
int Modular<MOD>::debug() const {
  return ( encoded_value );
}

}

using namespace std;
using namespace dadawodjawidawjdioawjfojaiowfja;

const int MX = (1 << 23); // should be at least 2 * n, a power of two
const int md = 998244353; // prime and of form 2^k * x + 1, where 2^k >= MX
const Modular<md> root = 31;      // MX-th root of unity modulo md

Modular<md> pow(Modular<md> x, int p) {
	Modular<md> r = 1;
	while (p) {
		if (p % 2 == 1) r = r * x;
		x = x * x;
		p /= 2;
	}
	return r;
}

int norm_pow(int x, int p) {
  int r = 1;
  while (p) {
		if (p % 2 == 1) r = (r * 1LL * x) % md;
		x = (x * 1LL * x) % md;
		p /= 2;
	}
	return r;
}

int rev[MX];

// init() must be called before any calls to fft() with exactly
// the same value of n, which must be a power of two!
void init(int n) {
	int log_n = 0;
	while ((n >> log_n) > 1) log_n++;

	for (int i = 0; i < n; i++) {
		rev[i] = 0;
		for (int j = 0; j < log_n; j++)
			rev[i] |= (i >> j & 1) << (log_n - 1 - j);

		if (rev[i] < i) rev[i] = i;
	}
}

void fft(Modular<md> a[], int n, bool invert) {
	static Modular<md> w_pow[MX];
	for (int i = 0; i < n; i++) swap(a[i], a[rev[i]]);
	for (int len = 1; len < n; len *= 2) {
		w_pow[0] = 1;
		w_pow[1] = pow(root, MX / (2 * len));
		if (invert) w_pow[1] = pow(w_pow[1], md - 2);
		for (int i = 2; i < len; i++) w_pow[i] = w_pow[i - 1] * w_pow[1];
		for (int i = 0; i < n; i += 2 * len)
			for (int j = i, k = i + len; j < i + len; j++, k++) {
				Modular<md> t = a[k] * w_pow[j - i], u = a[j];
				a[k] = u - t;
				a[j] = u + t;
			}
	}
	if (invert) {
		Modular<md> n_inv = norm_pow(n, md - 2);
		for (int i = 0; i < n; i++) a[i] = a[i] * n_inv;
	}
}

const int MAX = (1 << 21);

Modular<md> a[MAX], b[MAX];

int main() {
	int n, m;
	ignore = scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) {
		int x;
		ignore = scanf("%d", &x);
		a[x] = b[x] = 1;
	}

	init(MAX);
	fft(a, MAX, false);
	for (int i = 0; i < MAX; i++) a[i] = a[i] * a[i];
	fft(a, MAX, true);

	vector<int> ans;
	for (int i = 1; i <= m; i++) {
		int c = min(a[i].get_value(), 1);
		if (b[i].get_value() == c) continue;
		if (c == 1) {
			printf("NO\n");
			return 0;
		}
		ans.push_back(i);
	}

	printf("YES\n%d\n", (int)ans.size());
	for (int x : ans) printf("%d ", x);
	printf("\n");

	return 0;
}


//(c)Alex_2oo8

#include <bits/stdc++.h>

namespace dadawodjawidawjdioawjfojaiowfja {

template<int MOD>
class Modular {
  static constexpr int R = Modular<MOD>::compute_r();
  static constexpr int N_inverse = Modular<MOD>::compute_inverse();
  static constexpr int R_power = Modular<MOD>::compute_r_power();
  static constexpr int R_inverse = Modular<MOD>::compute_r_inverse();

  int encoded_value;

  static constexpr int compute_r();
  static constexpr int compute_inverse();
  static constexpr int compute_r_power();
  static constexpr int compute_r_inverse();

public:
  Modular ( int x );
  Modular () : encoded_value(0) { }
  inline Modular<MOD> operator + ( const Modular<MOD>& foo ) const;
  inline Modular<MOD> operator - ( const Modular<MOD>& foo ) const;
  inline Modular<MOD> operator * ( const Modular<MOD>& foo ) const;
  int get_value() const;

  int debug() const;

};

/* CONTEXPR */

template<int MOD>
constexpr int Modular<MOD>::compute_r() {
  int r = 1;
  while ( r < MOD ) r *= 2;
  return r;
}

template<int MOD>
constexpr int Modular<MOD>::compute_r_inverse() {
  int r = compute_r();

  int res = 1;
  int pow = MOD - 2; //TODO constexpr euler_phi

  while ( pow > 0 ) {
    if ( pow % 2 == 1 )
      res = ( res * 1LL * r ) % MOD;
      r = ( r * 1LL * r ) % MOD;
      pow /= 2;
  }

  return res;
}

template<int MOD>
constexpr int Modular<MOD>::compute_r_power() {
  int r = compute_r();
  int res = 0;
  while ( r > 1 ) {
    r /= 2;
    res += 1;
  }
  return res;
}

template<int MOD>
constexpr int Modular<MOD>::compute_inverse() {
  int r = compute_r();
  int N = MOD;
  int pow = r / 2 - 1;
  int res = 1;
  while ( pow > 0 ) {
    res = ( res * 1LL * N ) & ( r - 1 );
    N = ( N * 1LL * N ) & ( r - 1 );
    pow /= 2;
  }
  return res;
}

/* CLASS */

template<int MOD>
Modular<MOD>::Modular( int x ) {
  encoded_value = ( x * 1LL * R ) % MOD;
}

template<int MOD>
inline Modular<MOD> Modular<MOD>::operator + ( const Modular& foo ) const {
  Modular<MOD> nw;
  nw.encoded_value = ( encoded_value + foo.encoded_value );
  if ( nw.encoded_value >= MOD ) nw.encoded_value -= MOD;
  return nw;
}

template<int MOD>
inline Modular<MOD> Modular<MOD>::operator - ( const Modular& foo ) const {
  Modular<MOD> nw;
  nw.encoded_value = ( encoded_value - foo.encoded_value );
  if ( nw.encoded_value < 0 ) nw.encoded_value += MOD;
  return nw;
}

/* LOOKS OK */
template<int MOD>
inline Modular<MOD> Modular<MOD>::operator * ( const Modular& foo ) const {
  Modular<MOD> nw;

  long long AB_prim = encoded_value * 1LL * foo.encoded_value;
  long long up = (N_inverse * (AB_prim & ( R-1) ) ) & (R-1);

  up = up * MOD;

  AB_prim -= up;

  nw.encoded_value = AB_prim >> R_power;
  if ( nw.encoded_value < 0 ) nw.encoded_value += MOD;

  return nw;
}

template<int MOD>
int Modular<MOD>::get_value() const {
  return ( encoded_value * 1LL * R_inverse ) % MOD;
}

template<int MOD>
int Modular<MOD>::debug() const {
  return ( encoded_value );
}

}

using namespace std;
using namespace dadawodjawidawjdioawjfojaiowfja;

const int MX = (1 << 23); // should be at least 2 * n, a power of two
const int md = 998244353; // prime and of form 2^k * x + 1, where 2^k >= MX
const Modular<md> root = 31;      // MX-th root of unity modulo md

Modular<md> pow(Modular<md> x, int p) {
	Modular<md> r = 1;
	while (p) {
		if (p % 2 == 1) r = r * x;
		x = x * x;
		p /= 2;
	}
	return r;
}

int norm_pow(int x, int p) {
  int r = 1;
  while (p) {
		if (p % 2 == 1) r = (r * 1LL * x) % md;
		x = (x * 1LL * x) % md;
		p /= 2;
	}
	return r;
}

int rev[MX];

// init() must be called before any calls to fft() with exactly
// the same value of n, which must be a power of two!
void init(int n) {
	int log_n = 0;
	while ((n >> log_n) > 1) log_n++;

	for (int i = 0; i < n; i++) {
		rev[i] = 0;
		for (int j = 0; j < log_n; j++)
			rev[i] |= (i >> j & 1) << (log_n - 1 - j);

		if (rev[i] < i) rev[i] = i;
	}
}

void fft(Modular<md> a[], int n, bool invert) {
	static Modular<md> w_pow[MX];
	for (int i = 0; i < n; i++) swap(a[i], a[rev[i]]);
	for (int len = 1; len < n; len *= 2) {
		w_pow[0] = 1;
		w_pow[1] = pow(root, MX / (2 * len));
		if (invert) w_pow[1] = pow(w_pow[1], md - 2);
		for (int i = 2; i < len; i++) w_pow[i] = w_pow[i - 1] * w_pow[1];
		for (int i = 0; i < n; i += 2 * len)
			for (int j = i, k = i + len; j < i + len; j++, k++) {
				Modular<md> t = a[k] * w_pow[j - i], u = a[j];
				a[k] = u - t;
				a[j] = u + t;
			}
	}
	if (invert) {
		Modular<md> n_inv = norm_pow(n, md - 2);
		for (int i = 0; i < n; i++) a[i] = a[i] * n_inv;
	}
}

const int MAX = (1 << 21);

Modular<md> a[MAX], b[MAX];

int main() {
	int n, m;
	ignore = scanf("%d %d", &n, &m);
  for (int i = 0; i < n; i++) {
		int x;
		ignore = scanf("%d", &x);
		a[x] = b[x] = 1;
	}

	init(MAX);
	fft(a, MAX, false);
	for (int i = 0; i < MAX; i++) a[i] = a[i] * a[i];
	fft(a, MAX, true);

	vector<int> ans;
	for (int i = 1; i <= m; i++) {
		int c = min(a[i].get_value(), 1);
		if (b[i].get_value() == c) continue;
		if (c == 1) {
			printf("NO\n");
			return 0;
		}
		ans.push_back(i);
	}

	printf("YES\n%d\n", (int)ans.size());
	for (int x : ans) printf("%d ", x);
	printf("\n");

	return 0;
}


#include <cmath>
#include <cstdio>
#include <complex>
#include <iostream>
using namespace std;
#define ref(i,x,y)for(int i=x;i<=y;++i)
int read()
{
	char c=getchar();int d=0,f=1;
	for(;c<'0'||c>'9';c=getchar())if(c=='-')f=-1;
	for(;c>='0'&&c<='9';d=d*10+c-48,c=getchar());
	return d*f;
}
const int N=1<<21;
const double pi=acos(-1);
int rev[N],sz,SZ,n,m,a[N];
bool ans[N];
typedef complex<double> com;
class array{
public:
	com a[N];
	void fft(int tp)
	{
		ref(i,0,SZ-1)if(rev[i]<i)swap(a[rev[i]],a[i]);
		for(int i=2;i<=SZ;i<<=1)
		{
			int I=i>>1;com w(cos(pi/I),tp*sin(pi/I));
			for(int j=0;j<SZ;j+=i)
			{
				com W(1,0);
				for(int k=j;k<j+I;++k,W=W*w)
				{
					com A=a[k],B=a[k+I];
					a[k]=A+B*W;a[k+I]=A-B*W;
				}
			}
		}
		if(tp==-1)ref(i,0,SZ-1)a[i]/=SZ;
	}
}A;
int main()
{
	n=read(),m=read();
	ref(i,1,n)a[i]=read();
	while((1<<sz)<m)++sz;
	++sz;SZ=1<<sz;
	ref(i,0,SZ-1)rev[i]=(rev[i>>1]>>1)|((i&1)<<(sz-1));
	ref(i,1,n)A.a[a[i]]=com(1,0),ans[a[i]]=1;
	A.fft(1);
	ref(i,0,SZ-1)A.a[i]=A.a[i]*A.a[i];
	A.fft(-1);
	ref(i,1,m)if((int)(A.a[i].real()+0.5)==1)
	{
		if(!ans[i])
		{
			cout<<"NO"<<endl;
			return 0;
		}
		ans[i]=0;
	}
	cout<<"YES"<<endl;
	int sum=0;
	ref(i,1,m)if(ans[i])sum++;
	printf("%d\n",sum);
	ref(i,1,m)if(ans[i])printf("%d ",i);
	printf("\n");
}


#include <cmath>
#include <cstdio>
#include <complex>
#include <iostream>
using namespace std;
#define ref(i,x,y)for(int i=x;i<=y;++i)
int read()
{
	char c=getchar();int d=0,f=1;
	for(;c<'0'||c>'9';c=getchar())if(c=='-')f=-1;
	for(;c>='0'&&c<='9';d=d*10+c-48,c=getchar());
	return d*f;
}
const int N=1<<21;
const double pi=acos(-1);
int rev[N],sz,SZ,n,m,a[N];
bool ans[N];
typedef complex<double> com;
class array{
public:
	com a[N];
	void fft(int tp)
	{
		ref(i,0,SZ-1)if(rev[i]<i)swap(a[rev[i]],a[i]);
		for(int i=2;i<=SZ;i<<=1)
		{
			int I=i>>1;com w(cos(pi/I),tp*sin(pi/I));
			for(int j=0;j<SZ;j+=i)
			{
				com W(1,0);
				for(int k=j;k<j+I;++k,W=W*w)
				{
					com A=a[k],B=a[k+I];
					a[k]=A+B*W;a[k+I]=A-B*W;
				}
			}
		}
		if(tp==-1)ref(i,0,SZ-1)a[i]/=SZ;
	}
}A;
int main()
{
	n=read(),m=read();
	ref(i,1,n)a[i]=read();
	while((1<<sz)<m)++sz;
	++sz;SZ=1<<sz;
	ref(i,0,SZ-1)rev[i]=(rev[i>>1]>>1)|((i&1)<<(sz-1));
	ref(i,1,n)A.a[a[i]]=com(1,0),ans[a[i]]=1;
	A.fft(1);
	ref(i,0,SZ-1)A.a[i]=A.a[i]*A.a[i];
	A.fft(-1);
	ref(i,1,m)if((int)(A.a[i].real()+0.5)>=1)
	{
		if(!ans[i])
		{
			cout<<"NO"<<endl;
			return 0;
		}
		ans[i]=0;
	}
	cout<<"YES"<<endl;
	int sum=0;
	ref(i,1,m)if(ans[i])sum++;
	printf("%d\n",sum);
	ref(i,1,m)if(ans[i])printf("%d ",i);
	printf("\n");
}


/*
author: madhav_1999 aka orthodoxparadox
23 December 2019 at 7:30 AM
*/

#include <bits/stdc++.h>
#include <ext/pb_ds/detail/standard_policies.hpp>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;

#define dbl long double
#define int ll
#define ll long long
#define pii pair<int, int>
#define len(x) (int) x.size()
#define rev(a) reverse(all(a))
#define oiint ostream_iterator<int>(cout, " ")
#define pb push_back
#define mp make_pair
#define ff first
#define ss second
#define endl '\n'
#define all(a) a.begin(), a.end()
#define initialise(a, x) memset(a, x, sizeof(a))
#define onlyunique(v) v.erase(unique(all(v)), v.end()); //only for sorted vector
#define inf 2e18
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize ("O3")
#pragma GCC optimize ("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#define _CRT_SECURE_NO_WARNINGS
#ifdef MADHAV
#define dbg(...) __f(#__VA_ARGS__, __VA_ARGS__)
template <typename Arg1>
void __f(const char* name, Arg1&& arg1){cerr << name << " : " << arg1 << endl;}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args){
	const char* comma = strchr(names + 1, ',');
	cerr.write(names, comma - names) << " : " << arg1 << "  ";
	__f(comma + 1, args...);}
#else
#define dbg(...) 42
#endif
template <typename X> ostream& operator << (ostream& x,const vector<X>& v){for(int i=0;i<v.size();++i) x<<v[i]<<" ";return x;}
template <typename X> ostream& operator << (ostream& x,const set<X>& v){for(auto it:v) x<<it<<" ";return x;}
template <typename X, typename Y> ostream& operator << (ostream& x, const pair<X,Y>& v) {x<<v.ff<<" "<<v.ss;return x;}
template <typename T, typename S> ostream& operator << (ostream& os, const map<T, S>& v) { for (auto it : v) os << it.first << "=>" << it.second << endl; return os; }
typedef tree <int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
struct pair_hash {inline std::size_t operator()(const std::pair<int, int> & v) const {return v.first*31+v.second;}};
const int MOD = 1e9 + 7;

int takemod(int a, int mod = MOD){a%=mod;if(a<0)a+=mod;return a;}

int fast_exp(int base, int expo, int mod = MOD) {
	int res=1;
	while(expo>0) {
		if(expo&1) res=(res*base)%mod;
		base=(base*base)%mod;
		expo>>=1;}
	return res;}

int modinv(int a, int mod = MOD){return takemod(fast_exp(takemod(a), mod-2, mod), mod);}

#ifdef MADHAV
// cout << "Call initFFT() before using then uncomment" << endl << endl << endl;
#endif
//Change dbl to double for significant speed improvement
typedef double fd;
const fd PI = acos(-1);
const fd TAU = 2*PI;
const int N = 1e6 + 10;
const int LOGMAX = 21;
const int MAXN = (1LL << LOGMAX);

struct cx {
	fd x, y;
	cx() : x(0), y(0) {}
	cx(fd _x) : x(_x), y(0) {}
	cx(fd _x, fd _y) : x(_x), y(_y) {}
	fd real() {
		return x;
	}
	fd imag() {
		return y;
	}
	void operator= (fd _x) {
		x = _x, y = 0;
	}
	cx operator+ (const cx &c) const {
		return cx(x + c.x, y + c.y);
	}
	cx operator- (const cx &c) const {
		return cx(x - c.x, y - c.y);
	}
	cx operator* (const cx &c) const {
		return cx(x*c.x - y*c.y, x*c.y + y*c.x);
	}
	cx operator/ (fd fac) const {
		return cx(x/fac, y/fac);
	}
	cx& operator= (const cx &c) {
		this->x = c.x, this->y = c.y;
		return *this;
	}
	cx& operator+= (const cx &c) {
		return *this = *this + c;
	}
	cx& operator-= (const cx &c) {
		return *this = *this - c;
	}
	cx& operator*= (const cx &c) {
		return *this = *this * c;
	}
	cx& operator/= (fd fac) {
		return *this = *this/fac;
	}
	cx conjugate() {
		return cx(x, -y);
	}
};
ostream& operator << (ostream& os, const cx& c) { return os << c.x << " + " << c.y << "i\n"; }

cx omg[MAXN], iomg[MAXN];

void initFFT() {
	fd factor = TAU/MAXN;
	for(int i = 0; i < (MAXN >> 1); i++) {
		omg[i] = cx(cos(i*factor), sin(i*factor));
		iomg[i] = omg[i].conjugate();
	}
}
void FFT(vector<cx> &a, bool invert) {
	int n = len(a);
	int mask = 0;
	for(int i = 1; i < n; i++) {
		int bit = n >> 1;
		for(; mask & bit; bit >>= 1) mask ^= bit;
		mask ^= bit;
		if(i < mask) swap(a[i], a[mask]);
	}
	for(int l = 2; l <= n; l <<= 1) {
		for(int i = 0; i < n; i += l) {
			int ind = 0, inc = MAXN/l;
			for(int j = 0; j < (l >> 1); j++) {
				cx u = a[i + j], v = (a[i + j + (l >> 1)] * (invert ? iomg[ind] : omg[ind]));
				a[i + j] = (u + v);
				a[i + j + (l >> 1)] = (u - v);
				ind += inc;
			}
		}
	}
	if(invert)
		for(int i = 0; i < n; i++)
			a[i] /= n;
}

vector<int> multiply(const vector<int> &a, const vector<int> &b) {
	int n1 = len(a), n2 = len(b);
	int tot = n1 + n2 - 1, n = 1;
	while(n < tot) n <<= 1;
	vector<cx> P1(n), P2(n);
	for(int i = 0; i < n1; i++) P1[i] = cx(a[i]);
	for(int i = 0; i < n2; i++) P2[i] = cx(b[i]);
	FFT(P1, 0); FFT(P2, 0);
	for(int i = 0; i < n; i++) P1[i] *= P2[i];
	FFT(P1, 1);
	vector<int> c(tot);
	for(int i = 0; i < tot; i++) c[i] = (int)(P1[i].real() + 0.5);
	return c;
}

void solve()
{
	int n, m;
	cin >> n >> m;
	initFFT();
	vector<int> a(m+1, 0);
	map<int, bool> is_bag;
	for(int i = 0; i < n; i++)
	{
		int x;
		cin >> x;
		a[x]++;
		is_bag[x]= true;
	}
	a = multiply(a, a);
	dbg(a);
	vector<int> ans;
	for(int i = 0; i <= m; i++)
	{
		if(a[i])
		{
			if(!is_bag[i])
			{
				cout << "NO\n";
				return;
			}
		}
		else
		{
			if(is_bag[i])
			{
				ans.push_back(i);
			}
		}
	}
	cout << "YES\n";
	cout << ans.size() << endl << ans;
}

signed main(){
	ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
	#ifdef MADHAV
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
	freopen("error.txt", "w", stderr);
	#endif
	clock_t t1, t2;
	t1 = clock();

	int t = 1;
	// cin >> t;
	while(t--)
	{
		solve();
	}
	#ifdef MADHAV
	t2 = clock(); cerr << "time taken: " << (t2-t1)/(dbl)CLOCKS_PER_SEC;
	#endif
	return 0;
}


//Kaori Miyazono, did I reach you ?
//"I can't die because... I'm the one who will protect you." -Asuna Yuuki

#include <bits/stdc++.h>
using namespace std;

namespace FFT {
	typedef long long int ll;
	typedef complex<double> cd;

	const double PI = acos(-1.0);

	void fft(vector<cd> &a, bool inv) {
		int n = (int) a.size();
		if (n == 1) return;

		for(int i = 0, j = 0; i < n; i++) {
			if (i > j) {
				swap(a[i], a[j]);
			}
			for(int l = n / 2; (j ^= l) < l; l >>= 1);
		}

		double ang = inv ? -PI : PI;
		for(int sz = 1; sz < n; sz *= 2) {
			cd delta(cos(ang / sz), sin(ang / sz));
			for(int i = 0; i < n; i += 2 * sz) {
				cd cur_root(1, 0);
				for(int j = 0; j < sz; j++) {
					cd u = a[i + j], v = cur_root * a[i + j + sz];
					a[i + j] = u + v;
					a[i + j + sz] = u - v;
					cur_root *= delta;
				}
			}
		}
		if (inv) {
			for(int i = 0; i < n; i++) a[i] /= n;
		}
	}

	void multiply(vector<ll> &a, vector<ll> &b, vector<ll> &ans) {
		int n = 1;
		while(n < (int) max(a.size(), b.size())) n <<= 1;
		n <<= 1;
		vector<cd> t_a(n, cd(0)), t_b(n, cd(0));
		for(int i = 0; i < (int) a.size(); i++) {
			t_a[i] = cd(a[i]);
		}
		for(int i = 0; i < (int) b.size(); i++) {
			t_b[i] = cd(b[i]);
		}
		//fft
		fft(t_a, false);
		fft(t_b, false);
		//convolution
		for(int i = 0; i < n; i++) {
			t_a[i] = t_a[i] * t_b[i];
		}
		//inverse fft
		fft(t_a, true);
		ans.resize(n);
		for(int i = 0; i < n; i++) {
			ans[i] = ll(t_a[i].real() + 0.5);
		}
	}
};

int main() {
	//ios::sync_with_stdio(0); cin.tie(0);
	int n, m;
	scanf("%d %d", &n, &m);
	vector<FFT::ll> have(m + 1);
	have[0] = 1;
	for(int i = 0; i < n; i++) {
		int x;
		scanf("%d", &x);
		have[x] = 1;
	}
	vector<FFT::ll> ans;
	FFT::multiply(have, have, ans);
	for(int i = 0; i <= m; i++) {
		//cout << i << ' ' << ans[i] << ' ' << have[i] << '\n';
		if (!!ans[i] != !!have[i]) {
			cout << "NO";
			return 0;
		}
	}
	vector<int> an;
	for(int i = 1; i <= m; i++) {
		if (ans[i] == 2) {
			an.push_back(i);
		}
	}
	cout << "YES\n";
	printf("%d\n", (int) an.size());
	for(auto it : an) printf("%d ", it);
	return 0;
}


//Kaori Miyazono, did I reach you ?
//"I can't die because... I'm the one who will protect you." -Asuna Yuuki

#include <bits/stdc++.h>
using namespace std;

namespace FFT {
	typedef long long int ll;
	typedef complex<double> cd;

	const double PI = acos(-1.0);

	void fft(vector<cd> &a, bool inv) {
		int n = (int) a.size();
		if (n == 1) return;

		for(int i = 0, j = 0; i < n; i++) {
			if (i > j) {
				swap(a[i], a[j]);
			}
			for(int l = n / 2; (j ^= l) < l; l >>= 1);
		}

		double ang = inv ? -PI : PI;
		for(int sz = 1; sz < n; sz *= 2) {
			cd delta(cos(ang / sz), sin(ang / sz));
			for(int i = 0; i < n; i += 2 * sz) {
				cd cur_root(1, 0);
				for(int j = 0; j < sz; j++) {
					cd u = a[i + j], v = cur_root * a[i + j + sz];
					a[i + j] = u + v;
					a[i + j + sz] = u - v;
					cur_root *= delta;
				}
			}
		}
		if (inv) {
			for(int i = 0; i < n; i++) a[i] /= n;
		}
	}

	void multiply(vector<ll> &a, vector<ll> &b, vector<ll> &ans) {
		int n = 1;
		while(n < (int) max(a.size(), b.size())) n <<= 1;
		n <<= 1;
		vector<cd> t_a(n, cd(0)), t_b(n, cd(0));
		for(int i = 0; i < (int) a.size(); i++) {
			t_a[i] = cd(a[i]);
		}
		for(int i = 0; i < (int) b.size(); i++) {
			t_b[i] = cd(b[i]);
		}
		//fft
		fft(t_a, false);
		fft(t_b, false);
		//convolution
		for(int i = 0; i < n; i++) {
			t_a[i] = t_a[i] * t_b[i];
		}
		//inverse fft
		fft(t_a, true);
		ans.resize(n);
		for(int i = 0; i < n; i++) {
			ans[i] = ll(t_a[i].real() + 0.5);
			ans[i] = ans[i] > 0 ? 1 : 0;
		}
	}
};

int main() {
	//ios::sync_with_stdio(0); cin.tie(0);
	int n, m;
	scanf("%d %d", &n, &m);
	vector<FFT::ll> have(m + 1);
	have[0] = 1;
	for(int i = 0; i < n; i++) {
		int x;
		scanf("%d", &x);
		have[x] = 1;
	}
	vector<FFT::ll> ans;
	FFT::multiply(have, have, ans);
	for(int i = 0; i <= m; i++) {
		//cout << i << ' ' << ans[i] << ' ' << have[i] << '\n';
		if (ans[i] != have[i]) {
			cout << "NO";
			return 0;
		}
	}
	vector<int> mark(m + 1);
	vector<int> an;
	for(int i = 1; i <= m; i++) {
		if (ans[i] == 0 || mark[i]) continue;
		mark[i] = 1;
		an.push_back(i);
		for(int j = i + i; j <= m; j += i) {
			mark[j] = 1;
		}
	}
	cout << "YES\n";
	printf("%d\n", (int) an.size());
	for(auto it : an)printf("%d ", it);
	return 0;
}


#include <bits/stdc++.h>
using namespace std;

const int maxn = 2097152;
const double pi = acos(-1);
using cplx = complex<double>;
const cplx I(0, 1);
cplx omega[maxn + 1];
int a[maxn], cnt[maxn];

void prefft() {
    for (int i = 0; i <= maxn; ++i) omega[i] = exp(2 * pi * i / maxn * I);
}

void bin(vector<cplx> &a, int n) {
    vector<cplx> tmp(n);
    int lg = 0;
    while ((1 << lg) < n) ++lg; --lg;
    for (int i = 0; i < n; ++i) {
        int to = 0;
        for (int j = 0; (1 << j) < n; ++j) to |= (((i >> j) & 1) << (lg - j));
        tmp[to] = a[i];
    }
    for (int i = 0; i < n; ++i) a[i] = tmp[i];
}

void fft(vector<cplx> &a, int n) {
    bin(a, n);
    for (int step = 2; step <= n; step <<= 1) {
        int to = step >> 1;
        for (int i = 0; i < n; i += step) {
            for (int k = 0; k < to; ++k) {
                cplx right = omega[maxn / step * k] * a[i + to + k];
                a[i + to + k] = a[i + k] - right;
                a[i + k] += right;
            }
        }
    }
}

void ifft(vector<cplx> &a, int n) {
    fft(a, n);
    reverse(a.begin() + 1, a.end());
    for (int i = 0; i < n; ++i) a[i] /= n;
}

int main() {
    prefft();
    ios_base::sync_with_stdio(false); cin.tie(0);
    int n, m; cin >> n >> m;
    for (int i = 0; i < n; ++i) {
        cin >> a[i];
        ++cnt[a[i]];
    }
    ++m;
    int d = 1; while (d < m) d <<= 1; d <<= 1;
    // cout << "d = " << d << endl;
    vector<cplx> poly(d, 0);
    for (int i = 0; i < m; ++i) if (cnt[i] > 0) poly[i] = cplx(1, 0);
    fft(poly, d);
    for (int i = 0; i < d; ++i) poly[i] *= poly[i];
    ifft(poly, d);
    for (int i = 1; i < m; ++i) {
        int c = round(poly[i].real());
        if (c <= 0) continue;
        // cout << "i = " << i << endl;
        if (cnt[i] == 0) return cout << "NO" << endl, 0;
        cnt[i] = 0;
    }
    vector<int> ans;
    for (int i = 1; i < m; ++i) if (cnt[i]) ans.push_back(i);
    cout << "YES" << endl;
    cout << ans.size() << endl;
    for (int i : ans) cout << i << ' '; cout << endl;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;

const int maxn = 2097152;
const double pi = acos(-1);
using cplx = complex<double>;
const cplx I(0, 1);
cplx omega[maxn + 1];
int a[maxn], cnt[maxn];

void prefft() {
    for (int i = 0; i <= maxn; ++i) omega[i] = exp(2 * pi * i / maxn * I);
}

void bin(vector<cplx> &a, int n) {
    vector<cplx> tmp(n);
    int lg = 0;
    while ((1 << lg) < n) ++lg; --lg;
    for (int i = 0; i < n; ++i) {
        int to = 0;
        for (int j = 0; (1 << j) < n; ++j) to |= (((i >> j) & 1) << (lg - j));
        tmp[to] = a[i];
    }
    for (int i = 0; i < n; ++i) a[i] = tmp[i];
}

void fft(vector<cplx> &a, int n) {
    bin(a, n);
    for (int step = 2; step <= n; step <<= 1) {
        int to = step >> 1;
        for (int i = 0; i < n; i += step) {
            for (int k = 0; k < to; ++k) {
                cplx right = omega[maxn / step * k] * a[i + to + k];
                a[i + to + k] = a[i + k] - right;
                a[i + k] += right;
            }
        }
    }
}

void ifft(vector<cplx> &a, int n) {
    fft(a, n);
    reverse(a.begin() + 1, a.end());
    for (int i = 0; i < n; ++i) a[i] /= n;
}

int main() {
    prefft();
    ios_base::sync_with_stdio(false); cin.tie(0);
    int n, m; cin >> n >> m;
    for (int i = 0; i < n; ++i) {
        cin >> a[i];
        ++cnt[a[i]];
    }
    ++m;
    int d = 1; while (d < m) d <<= 1; d <<= 1;
    vector<cplx> poly(d, 0);
    for (int i = 0; i < m; ++i) if (cnt[i] > 0) poly[i] = cplx(1, 0);
    fft(poly, d);
    for (int i = 0; i < d; ++i) poly[i] *= poly[i];
    ifft(poly, d);
    for (int i = 1; i < m; ++i) {
        int c = round(poly[i].real());
        if (c <= 0) continue;
        if (cnt[i] == 0) return cout << "NO" << endl, 0;
        cnt[i] = 0;
    }
    vector<int> ans;
    for (int i = 1; i < m; ++i) if (cnt[i]) ans.push_back(i);
    cout << "YES" << endl;
    cout << ans.size() << endl;
    for (int i : ans) cout << i << ' '; cout << endl;
    return 0;
}


#include <bits/stdc++.h>
using namespace std;
#define pb push_back
typedef long double ld;
ld PI = acosl(-1);
typedef long long ll;
#define pb push_back
typedef pair<ll, ll> ii;

struct base {
	ld a, b;
	base(ld a = 0, ld b = 0) : a(a), b(b) {}
	const base operator + (const base &c) const
		{ return base(a + c.a, b + c.b); }
	const base operator - (const base &c) const
		{ return base(a - c.a, b - c.b); }
	const base operator * (const base &c) const
		{ return base(a * c.a - b * c.b, a * c.b + b * c.a); }
};
void fft(vector<base> &p, bool inv = 0) {
	int n = p.size(), i = 0;
	for(int j = 1; j < n - 1; ++j) {
		for(int k = n >> 1; k > (i ^= k); k >>= 1);
		if(j < i) swap(p[i], p[j]);
	}
	for(ll l = 1, m; (m = l << 1) <= n; l <<= 1) {
		ld ang = 2 * PI / m;
		base wn = base(cos(ang), (inv ? 1. : -1.) * sin(ang)), w;
		for(int i = 0, j, k; i < n; i += m) {
			for(w = base(1, 0), j = i, k = i + l; j < k; ++j, w = w * wn) {
				base t = w * p[j + l];
				p[j + l] = p[j] - t;
				p[j] = p[j] + t;
			}
		}
	}
	if(inv) for(int i = 0; i < n; ++i) p[i].a /= n, p[i].b /= n;
}
vector<int> multiply(vector<int> &a, vector<int> &b) {
	int n = a.size(), m = b.size(), t = n + m - 1, sz = 1;
	while(sz < t) sz <<= 1;
	vector<base> x(sz), y(sz), z(sz);
	//cout<<sz<<" "<<t<<endl;
	for(int i = 0 ; i < sz; ++i) {
		x[i] = i < a.size() ? base(a[i], 0) : base(0, 0);
		y[i] = i < b.size() ? base(b[i], 0) : base(0, 0);
	}
	fft(x), fft(y);
	for(int i = 0; i < sz; ++i) z[i] = x[i] * y[i];
	fft(z, 1);
	vector<int> ret(sz);
	for(int i = 0; i < sz; ++i) ret[i] = z[i].a + 0.5;
	while(ret.size() > 1 && ret.back() == 0) ret.pop_back();
	return ret;
}
int vis[3000000];
int main()
{
    vector<int>a,b;
    int i,j,k,l,m,n;
    scanf("%d%d",&n,&m);
    a.resize(m+1);
    a[0]=1;
    for(int i=0;i<n;i++){
        scanf("%d",&l);
        vis[l]=1;
        a[l]=1;
    }
    b=a;
    b[0]=0;
    vector<int>ret=multiply(a,b),ou;
    for(int i=1;i<ret.size()&&i<=m;i++)
    {
      //  cout<<ret[i]<<endl;
        if(ret[i]>0)
        {
            if(vis[i]==0){
                //    cout<<i<<endl;
                printf("NO\n");
                return 0;
            }
            if(ret[i]==1)ou.pb(i);
        }
    }
    cout<<"YES\n"<<endl;
   cout<<ou.size()<<endl;
   for(int i=0;i<ou.size();i++)cout<<ou[i]<<" ";
}


#include<bits/stdc++.h>
#define rep(i,a,b) for (int i=(a); i<=int(b); i++)
using namespace std;

const int maxn = 1 << 21;
const int MOD = 998244353, base = 3;
int flag[maxn], a[maxn], g[maxn], R[maxn];
int K, m, x, n, L, rev, tmp;
vector<int> ans;

inline int power(int x, int p) {
	int res = 1;
	while (p) {
		if (p&1) res = 1LL * res * x % MOD;
		x = 1LL * x * x % MOD; p >>= 1;
	}
	return res;
}

void NTT(int a[maxn], int n) {
	rep (i, 0, n-1) if (i < R[i]) swap(a[i], a[R[i]]);
	for (int d = 1, t = n >> 1; d < n; d <<= 1, t >>= 1)
		for (int i = 0; i < n; i += (d << 1))
			for (int j = 0; j < d; j++) {
				tmp = 1LL * g[t*j] * a[i+j+d] % MOD;
				a[i+j+d] = (a[i+j] - tmp + MOD) % MOD;
				a[i+j] = (a[i+j] + tmp) % MOD;
			}
}

int main() {
	scanf("%d%d", &K, &m); m++;
	rep (i, 1, K) scanf("%d", &x), flag[x] = a[x] = 1;
	for (n = 1; n <= 2 * m; n <<= 1, L++);
	rep (i, 0, n-1) R[i] = (R[i>>1]>>1) | ((i&1)<<(L-1));
	g[0] = 1; g[1] = power(base, (MOD - 1) / n);
	rep (i, 2, n-1) g[i] = 1LL * g[i-1] * g[1] % MOD;
	NTT(a, n);
	rep (i, 0, n-1) a[i] = 1LL * a[i] * a[i] % MOD;
	g[1] = power(g[1], MOD - 2);
	rep (i, 2, n-1) g[i] = 1LL * g[i-1] * g[1] % MOD;
	NTT(a, n); rev = power(n, MOD-2);
	rep (i, 0, n-1) a[i] = 1LL * a[i] * rev % MOD;
	rep (i, 0, m-1)
		if (a[i] && !flag[i]) return puts("NO"), 0;
		else if (!a[i] && flag[i]) ans.push_back(i);
	puts("YES");
	printf("%d\n", ans.size());
	rep (i, 0, ans.size()-1) printf("%d ", ans[i]);
	return 0;
}


#include <algorithm>
#include <iostream>
#include <vector>
#include <cstdio>
#include <bitset>
#include <cmath>
using namespace std;
const int N = 1e6 + 6;

int n, m;
bitset<N> ex, must;
vector<int> v;

int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0, x; i < n; i++) scanf("%d", &x), must[x] = 1;
  for (int i = 1; i <= m; i++) {
    int l = min((int)v.size(), 700);
    for (int j = 0; j < l && v[j] + v[j] <= i; j++)
      if (ex[i - v[j]]) {
        ex[i] = 1;
        break;
      }
    if (!ex[i]) {
      int s = upper_bound(v.begin(), v.end(), i / 2) - v.begin() - 1,
          l = max(700, s - 700);
      for (int j = s; j > l; j--)
        if (ex[i - v[j]]) {
          ex[i] = 1;
          break;
        }
    }
    if (!must[i] && ex[i]) {
      printf("NO\n");
      return 0;
    }
    if (must[i] && !ex[i]) ex[i] = 1, v.push_back(i);
  }
  printf("YES\n%d\n", (int)v.size());
  for (int i = 0; i < v.size(); i++) printf("%d ", v[i]);
  printf("\n");
  return 0;
}


#include <bits/stdc++.h>

#define F first
#define S second
#define pii pair<int, int>
#define pb push_back

using namespace std;

typedef long long ll;
typedef long double ld;
typedef complex<double> point;

const int LOG = 21, maxN = (1 << LOG);

point a[maxN];
bool visited[maxN];

void FFT(point* a, bool rev)
{
	for(int i=0; i<maxN; i++)
	{
		int j = 0;
		for(int k=0; k<LOG; k++)
			if(i & (1 << k))
				j += (1 << (LOG - k - 1));
		if(j > i)swap(a[i], a[j]);
	}

	for(int len=2; len<=maxN; len *= 2){

		point wn(cos(2.0 * M_PI / len), sin(2.0 * M_PI / len));
		if(rev) wn.imag(wn.imag() * -1.0);

		for(int i=0; i<maxN; i += len){
			point w(1.0, 0.0);
			for(int j=0; j<len/2; j++)
			{
				point t1 = a[i + j] + w * a[i + j + len/2];
				point t2 = a[i + j] - w * a[i + j + len/2];
				a[i + j] = t1;
				a[i + j + len/2] = t2;
				w *= wn;
			}
		}
	}

	if(rev)
		for(int i=0; i<maxN; i++)
			a[i] /= maxN;

	return ;
}

ll ebs(ld x){
	ll res = (ll)x;
	if(x - res < 0.5)return res;
	else return res + 1;
}

int main()
{
	ios_base::sync_with_stdio(0); cin.tie(0);
	int n, m; cin >> n >> m;
	for(int i=0; i<n; i++)
	{
		int x; cin >> x;
		a[x].real(1);
		visited[x] = true;
	}

	FFT(a, 0);
	for(int i=0; i<maxN; i++) a[i] = a[i] * a[i];

	FFT(a, 1);

	vector<int> ans;

	for(int i=0; i<=m; i++)
	{
		ld t = a[i].real();
		ll res = ebs(t);
		if(!visited[i] && res)return cout << "NO\n" << endl, 0;
		if(res == 0 && visited[i])ans.pb(i);

	}

	cout << "YES\n" << ans.size() << endl;
	for(auto x : ans)
		cout << x << ' '; cout << endl;
	return 0;

}


#include <bits/stdc++.h>
//#include <math.h>
//#include <complex>

#define F first
#define S second
#define pii pair<int, int>
#define pb push_back

using namespace std;

typedef long long ll;
typedef long double ld;

//typedef complex<double> point;

const ld PI = acos(-1);
const int LOG = 21, maxN = (1 << LOG), mod = 998244353, base = 3;

int a[maxN];
bool visited[maxN];

int power(int a, int b)
{
	if(b == 0)return 1;
	ll res = power(a, b/2);
	res *= res, res %= mod;
	if(b & 1) res *= a, res %= mod;
	return res;
}

void NTT(int* a, bool rev)
{
	for(int i=0; i<maxN; i++)
	{
		int j = 0;
		for(int k=0; k<LOG; k++)
			if(i & (1 << k))
				j += (1 << (LOG - k - 1));
		if(j > i)swap(a[i], a[j]);
	}

	for(int len=2; len<=maxN; len *= 2){

		int wn = power(base, (mod - 1) / len);
		if(rev) wn = power(wn, mod - 2);

		for(int i=0; i<maxN; i += len){
			int w = 1;
			for(int j=0; j<len/2; j++)
			{
				int t1 = a[i + j] + 1LL * w * a[i + j + len/2] % mod;
				int t2 = a[i + j] - 1LL * w * a[i + j + len/2] % mod;
				a[i + j] = t1;
				if(a[i + j] >= mod) a[i + j] -= mod;
				a[i + j + len/2] = t2;
				if(a[i + j + len/2] < 0)a[i + j + len/2] += mod;
				w = 1LL * w * wn % mod;
			}
		}
	}
	int _inv = power(maxN, mod - 2);
	if(rev)
		for(int i=0; i<maxN; i++)
			a[i] = 1LL * a[i] * _inv % mod;

	return ;
}

ll ebs(ld x){
	ll res = (ll)x;
	if(x - res < 0.5)return res;
	else return res + 1;
}

int main()
{
	ios_base::sync_with_stdio(0); cin.tie(0);
	int n, m; cin >> n >> m;
	for(int i=0; i<n; i++)
	{
		int x; cin >> x;
		a[x] = 1;
		visited[x] = true;
	}

	NTT(a, 0);
	for(int i=0; i<maxN; i++) a[i] = (1LL * a[i] * a[i]) % mod;

	NTT(a, 1);

	vector<int> ans;

	for(int i=0; i<=m; i++)
	{
		ll res = a[i];

		if(!visited[i] && res)return cout << "NO\n" << endl, 0;
		if(res == 0 && visited[i])ans.pb(i);

	}

	cout << "YES\n" << ans.size() << endl;
	for(auto x : ans)
		cout << x << ' '; cout << endl;
	return 0;

}


#include <bits/stdc++.h>
//#include <math.h>
//#include <complex>

#define F first
#define S second
#define pii pair<int, int>
#define pb push_back

using namespace std;

typedef long long ll;
typedef long double ld;
typedef complex<double> point;

const ld PI = acos(-1);
const int LOG = 21, maxN = (1 << LOG);

point a[maxN];
bool visited[maxN];

void FFT(point* a, bool rev)
{
	for(int i=0; i<maxN; i++)
	{
		int j = 0;
		for(int k=0; k<LOG; k++)
			if(i & (1 << k))
				j += (1 << (LOG - k - 1));
		if(j > i)swap(a[i], a[j]);
	}

	for(int len=2; len<=maxN; len *= 2){

		point wn(cos(2.0 * PI / len), sin(2.0 * PI / len));
		if(rev) wn.imag(wn.imag() * -1.0);

		for(int i=0; i<maxN; i += len){
			point w(1.0, 0.0);
			for(int j=0; j<len/2; j++)
			{
				point t1 = a[i + j] + w * a[i + j + len/2];
				point t2 = a[i + j] - w * a[i + j + len/2];
				a[i + j] = t1;
				a[i + j + len/2] = t2;
				w *= wn;
			}
		}
	}

	if(rev)
		for(int i=0; i<maxN; i++)
			a[i] /= maxN;

	return ;
}

ll ebs(ld x){
	ll res = (ll)x;
	if(x - res < 0.5)return res;
	else return res + 1;
}

int main()
{
	ios_base::sync_with_stdio(0); cin.tie(0);
	int n, m; cin >> n >> m;
	for(int i=0; i<n; i++)
	{
		int x; cin >> x;
		a[x].real(1);
		visited[x] = true;
	}

	FFT(a, 0);
	for(int i=0; i<maxN; i++) a[i] = a[i] * a[i];

	FFT(a, 1);

	vector<int> ans;

	for(int i=0; i<=m; i++)
	{
		ld t = a[i].real();
		ll res = ebs(t);
		if(!visited[i] && res)return cout << "NO\n" << endl, 0;
		if(res == 0 && visited[i])ans.pb(i);

	}

	cout << "YES\n" << ans.size() << endl;
	for(auto x : ans)
		cout << x << ' '; cout << endl;
	return 0;

}


#include <bits/stdc++.h>
//#include <math.h>
//#include <complex>

#define F first
#define S second
#define pii pair<int, int>
#define pb push_back

using namespace std;

typedef long long ll;
typedef long double ld;
typedef complex<double> point;

const ld PI = acos(-1);
const int LOG = 20, maxN = (1 << LOG);

point a[maxN];
bool visited[maxN];

void FFT(point* a, bool rev)
{
	for(int i=0; i<maxN; i++)
	{
		int j = 0;
		for(int k=0; k<LOG; k++)
			if(i & (1 << k))
				j += (1 << (LOG - k - 1));
		if(j > i)swap(a[i], a[j]);
	}

	for(int len=2; len<=maxN; len *= 2){

		point wn(cos(2.0 * PI / len), sin(2.0 * PI / len));
		if(rev) wn.imag(wn.imag() * -1.0);

		for(int i=0; i<maxN; i += len){
			point w(1.0, 0.0);
			for(int j=0; j<len/2; j++)
			{
				point t1 = a[i + j] + w * a[i + j + len/2];
				point t2 = a[i + j] - w * a[i + j + len/2];
				a[i + j] = t1;
				a[i + j + len/2] = t2;
				w *= wn;
			}
		}
	}

	if(rev)
		for(int i=0; i<maxN; i++)
			a[i] /= maxN;

	return ;
}

ll ebs(ld x){
	ll res = (ll)x;
	if(x - res < 0.5)return res;
	else return res + 1;
}

int main()
{
	ios_base::sync_with_stdio(0); cin.tie(0);
	int n, m; cin >> n >> m;
	for(int i=0; i<n; i++)
	{
		int x; cin >> x;
		a[x].real(1);
		visited[x] = true;
	}

	FFT(a, 0);
	for(int i=0; i<maxN; i++) a[i] = a[i] * a[i];

	FFT(a, 1);

	vector<int> ans;

	for(int i=0; i<=m; i++)
	{
		ld t = a[i].real();
		ll res = ebs(t);
		if(!visited[i] && res)return cout << "NO\n" << endl, 0;
		if(res == 0 && visited[i])ans.pb(i);

	}

	cout << "YES\n" << ans.size() << endl;
	for(auto x : ans)
		cout << x << ' '; cout << endl;
	return 0;

}


#include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;

#define fastio std::ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); cout.precision(10); cout<<fixed;
#define fileinout freopen("input.txt", "r", stdin);freopen("output.txt", "w", stdout);
#define forn(i,n) for(int i = 0; i < (int)(n); ++i)
#define for1(i,n) for(int i = 1; i <= (int)(n); ++i)
#define fore(i,l,r) for(int i = (int)(l); i <= (int)(r); ++i)
#define ford(i,n) for(int i = (int)(n)-1; i >= 0; --i)
#define pb push_back
#define fi first
#define se second
#define all(x) (x).begin(),(x).end()
#define rall(x) (x).rbegin(),(x).rend()
#define maxheap priority_queue<int>
#define minheap priority_queue<int, vector<int>, greater<int> >
#define mp make_pair
#define MOD 1000000007
typedef long long int lli;
typedef vector<int> vi;
typedef vector<lli> vlli;
typedef vector<vi> vvi;
typedef vector<vlli> vvlli;
typedef long double ld;
typedef pair<int,int> pii;
typedef pair<lli,lli> plli;
typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> ordered_set;

lli modexp(lli x, lli y, lli mod){ lli ans=1ll; while(y>0){ if(y&1) ans = (ans*x)%mod; x = (x*x)%mod; y=y>>1; } return ans; }
lli modinv(lli x, lli mod){ return modexp(x, mod-2, mod); }

template <typename Tf = long double, typename Td = long long int>
struct FFT{
	int NMAX;
	complex<Tf> *mul1, *mul2;
	typedef complex<Tf> CTf;

	FFT(int NMAX):NMAX(NMAX){
		mul1 = new CTf[NMAX];
	    mul2 = new CTf[NMAX];
	    for(int i=0; i<NMAX; i++) mul1[i] = mul2[i] = 0;
	}

	void fft(complex<Tf>* a, int n,  bool inverse) {
	    const Tf pi = acos(-1);
		for(int i = 0, j = 0; i < n; i++) {
			if(j > i) swap(a[i], a[j]);
			int k = n;
			while(j & (k >>= 1)) j &= ~k;
			j |= k;
		}

		Tf pi2 = inverse ? -pi : pi;
		for(int step = 1; step < n; step <<= 1) {
			Tf alpha = pi2 / step;
			for(int k = 0; k < step; k++) {
				CTf omegak = exp(CTf(0, alpha*k));
				for(int Ek = k; Ek < n; Ek += step << 1) {
					int Ok = Ek + step;
					CTf t = omegak * a[Ok];
					a[Ok] = a[Ek] - t;
					a[Ek] += t;
				}
			}
		}

		if(inverse)
			for(int i = 0; i < n; i++) a[i] /= n;
	}

	void mult(Tf* v1, Tf* v2, int& n1, int n2){
	    int sz = 2;
	    while(sz < n1 + n2) sz *= 2;
	    for(int i=0; i<n1; i++) mul1[i] = CTf(v1[i], 0);
	    for(int i=0; i<n2; i++) mul2[i] = CTf(v2[i], 0);
	    fft(mul1, sz, false);
	    fft(mul2, sz, false);
		for(int i=0; i<sz; i++) mul1[i] = mul1[i] * mul2[i];
	    fft(mul1, sz, true);
	    for(int i=0; i<sz; i++) v1[i] = ((Td)(mul1[i].real() + 0.5));
	    n1 += n2-1;
	    for(int i=0; i<sz; i++) mul1[i] = mul2[i] = 0;
	}
};

typedef double tf;
int n, m;
const int N = (1<<21);
FFT<double, int> f(N);
tf p1[N], p2[N];

void pre(){

}

void solve(){
	cin>>n>>m;
	vi a(n);
	forn(i,n) cin>>a[i], p1[a[i]] = 1, p2[a[i]] = 1;
	int sz1 = m+1, sz2 = m+1;
	f.mult(p1, p2, sz1, sz2);
	set<int> s;
	// cout<<sz1<<' '<<sz2<<endl;
	forn(i, sz2){
		int c1 = (int)(p1[i] + 1e-6);
		int c2 = (int)(p2[i] + 1e-6);
		if(c1 != 0 and c2 != 0){
		}else if(c1 == 0 and c2 != 0){
			s.insert(i);
		}else if(c1 != 0 and c2 == 0){
			cout<<"NO\n";
			return;
		}
	}
	cout<<"YES\n";
	cout<<s.size()<<'\n';
	for(int u: s) cout<<u<<' ';
}
int main(){
	fastio;
	pre();
	int T=1;
	//cin>>T;
	while(T--){
		solve();
	}
	return 0;
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;

typedef complex<double> point;
#define X real()
#define Y imag()

const int B = 21, N = 1 << B;
const double PI = acos(-1);

void fft(point a[], int p = 1){
	for (int i = 0; i < N; i++){
		int r = 0;
		for (int j = 0; j < B; j++)
			if (i >> j & 1) r |= 1 << (B - 1 - j);
		if (r < i) swap(a[i], a[r]);
	}

	for (int l = 2; l <= N; l *= 2){
		point wn = polar(1.0, 2 * PI / l * p);
		for (int i = 0; i < N; i += l){
			point w(1.0, 0.0);
			for (int j = 0; j < l / 2; j++){
				point A = a[i + j], B = w * a[i + j + l / 2];
				a[i + j] = A + B;
				a[i + j + l / 2] = A - B;
				w *= wn;
			}
		}
	}

	if (p == -1)
		for (int i = 0; i < N; i++)
			a[i] /= N;
}

point a[N];
bool have[N];
int ans[N], ansN;

int main(){
	int n, m; scanf("%d%d", &n, &m);
	for (int i = 0; i < n; i++){
		int x; scanf("%d", &x);
		have[x] = true;
		a[x] = point(1, 0);
	}

	fft(a, 1);
	for (int i = 0; i < N; i++) a[i] *= a[i];
	fft(a, -1);

	for (int i = 0; i < m; i++)
		if (have[i] && a[i].X < 0.1) ans[ansN++] = i;
		else if (!have[i] && a[i].X > 0.5) printf( "NO\n" ), exit(0);

	printf("%d\n", ansN);
	for (int i = 0; i < ansN; i++)
		printf("%d ", ans[i]);
}


#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<int, int> pii;

typedef complex<double> point;
#define X real()
#define Y imag()

const int B = 21, N = 1 << B;
const double PI = acos(-1);

void fft(point a[], int p = 1){
	for (int i = 0; i < N; i++){
		int r = 0;
		for (int j = 0; j < B; j++)
			if (i >> j & 1) r |= 1 << (B - 1 - j);
		if (r < i) swap(a[i], a[r]);
	}

	for (int l = 2; l <= N; l *= 2){
		point wn = polar(1.0, 2 * PI / l * p);
		for (int i = 0; i < N; i += l){
			point w(1.0, 0.0);
			for (int j = 0; j < l / 2; j++){
				point A = a[i + j], B = w * a[i + j + l / 2];
				a[i + j] = A + B;
				a[i + j + l / 2] = A - B;
				w *= wn;
			}
		}
	}

	if (p == -1)
		for (int i = 0; i < N; i++)
			a[i] /= N;
}

point a[N];
bool have[N];
int ans[N], ansN;

int main(){
	int n, m; scanf("%d%d", &n, &m);
	for (int i = 0; i < n; i++){
		int x; scanf("%d", &x);
		have[x] = true;
		a[x] = point(1, 0);
	}

	fft(a, 1);
	for (int i = 0; i < N; i++) a[i] *= a[i];
	fft(a, -1);

	for (int i = 0; i < m; i++)
		if (have[i] && a[i].X < 0.1) ans[ansN++] = i;
		else if (!have[i] && a[i].X > 0.5) printf( "NO\n" ), exit(0);

	printf("YES\n%d\n", ansN);
	for (int i = 0; i < ansN; i++)
		printf("%d ", ans[i]);
}


//#pragma GCC optimize(2)
//#pragma GCC optimize(3)
//#pragma GCC optimize(4)
//#pragma GCC optimize("unroll-loops")
//#pragma comment(linker, "/stack:200000000")
//#pragma GCC optimize("Ofast,no-stack-protector")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include<bits/stdc++.h>
//#include <bits/extc++.h>
#define fi first
#define se second
#define db double
#define mp make_pair
#define pb push_back
#define mt make_tuple
//#define pi acos(-1.0)
#define ll long long
#define vi vector<int>
#define mod 1009
#define ld long double
//#define C 0.5772156649
#define ls l,m,rt<<1
#define rs m+1,r,rt<<1|1
#define pll pair<ll,ll>
#define pil pair<int,ll>
#define pli pair<ll,int>
#define pii pair<int,int>
#define ull unsigned long long
#define bpc __builtin_popcount
#define base 1000000000000000000ll
#define fin freopen("a.txt","r",stdin)
#define fout freopen("a.txt","w",stdout)
#define fio ios::sync_with_stdio(false);cin.tie(0)
#define mr mt19937 rng(chrono::steady_clock::now().time_since_epoch().count())
inline ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
inline void sub(ll &a,ll b){a-=b;if(a<0)a+=mod;}
inline void add(ll &a,ll b){a+=b;if(a>=mod)a-=mod;}
template<typename T>inline T const& MAX(T const &a,T const &b){return a>b?a:b;}
template<typename T>inline T const& MIN(T const &a,T const &b){return a<b?a:b;}
inline ll mul(ll a,ll b,ll c){return (a*b-(ll)((ld)a*b/c)*c+c)%c;}
inline ll qp(ll a,ll b){ll ans=1;while(b){if(b&1)ans=ans*a%mod;a=a*a%mod,b>>=1;}return ans;}
inline ll qp(ll a,ll b,ll c){ll ans=1;while(b){if(b&1)ans=mul(ans,a,c);a=mul(a,a,c),b>>=1;}return ans;}

using namespace std;
//using namespace __gnu_pbds;

const ld pi = acos(-1);
const ull ba=233;
const db eps=1e-5;
const ll INF=0x3f3f3f3f3f3f3f3f;
const int N=1000000+10,maxn=2000000+10,inf=0x3f3f3f3f;

struct cd{
    ld x,y;
    cd(ld _x=0.0,ld _y=0.0):x(_x),y(_y){}
    cd operator +(const cd &b)const{
        return cd(x+b.x,y+b.y);
    }
    cd operator -(const cd &b)const{
        return cd(x-b.x,y-b.y);
    }
    cd operator *(const cd &b)const{
        return cd(x*b.x - y*b.y,x*b.y + y*b.x);
    }
    cd operator /(const db &b)const{
        return cd(x/b,y/b);
    }
}a[N<<3];
int rev[N<<3];
void getrev(int bit)
{
    for(int i=0;i<(1<<bit);i++)
        rev[i]=(rev[i>>1]>>1) | ((i&1)<<(bit-1));
}
void fft(cd *a,int n,int dft)
{
    for(int i=0;i<n;i++)
        if(i<rev[i])
            swap(a[i],a[rev[i]]);
    for(int step=1;step<n;step<<=1)
    {
        cd wn(cos(dft*pi/step),sin(dft*pi/step));
        for(int j=0;j<n;j+=step<<1)
        {
            cd wnk(1,0);
            for(int k=j;k<j+step;k++)
            {
                cd x=a[k];
                cd y=wnk*a[k+step];
                a[k]=x+y;a[k+step]=x-y;
                wnk=wnk*wn;
            }
        }
    }
    if(dft==-1)for(int i=0;i<n;i++)a[i]=a[i]/n;
}
int c[N];
int main()
{
    int n,m;scanf("%d%d",&n,&m);
    for(int i=1,x;i<=n;i++)scanf("%d",&x),c[x]++;
    int sz=0;
    while((1<<sz)<=m)sz++;sz++;
    getrev(sz);
    int len=(1<<sz);
    a[0]=1;
    for(int i=1;i<len;i++)a[i]=c[i];
    fft(a,len,1);
    for(int i=0;i<len;i++)a[i]=a[i]*a[i];
    fft(a,len,-1);
    vi ans;
    for(int i=1;i<=m;i++)
    {
        int x=(int)(a[i].x+0.5);
        if(!x)continue;
        if(!c[i])return 0*puts("NO");
        else if(x==2)ans.pb(i);
    }
    puts("YES");
    printf("%d\n",ans.size());
    for(int x:ans)printf("%d ",x);puts("");
    return 0;
}
/********************

********************/


//#pragma GCC optimize(2)
//#pragma GCC optimize(3)
//#pragma GCC optimize(4)
//#pragma GCC optimize("unroll-loops")
//#pragma comment(linker, "/stack:200000000")
//#pragma GCC optimize("Ofast,no-stack-protector")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include<bits/stdc++.h>
//#include <bits/extc++.h>
#define fi first
#define se second
#define db double
#define mp make_pair
#define pb push_back
#define mt make_tuple
//#define pi acos(-1.0)
#define ll long long
#define vi vector<int>
#define mod 1009
#define ld long double
//#define C 0.5772156649
#define ls l,m,rt<<1
#define rs m+1,r,rt<<1|1
#define pll pair<ll,ll>
#define pil pair<int,ll>
#define pli pair<ll,int>
#define pii pair<int,int>
#define ull unsigned long long
#define bpc __builtin_popcount
#define base 1000000000000000000ll
#define fin freopen("a.txt","r",stdin)
#define fout freopen("a.txt","w",stdout)
#define fio ios::sync_with_stdio(false);cin.tie(0)
#define mr mt19937 rng(chrono::steady_clock::now().time_since_epoch().count())
inline ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
inline void sub(ll &a,ll b){a-=b;if(a<0)a+=mod;}
inline void add(ll &a,ll b){a+=b;if(a>=mod)a-=mod;}
template<typename T>inline T const& MAX(T const &a,T const &b){return a>b?a:b;}
template<typename T>inline T const& MIN(T const &a,T const &b){return a<b?a:b;}
inline ll mul(ll a,ll b,ll c){return (a*b-(ll)((ld)a*b/c)*c+c)%c;}
inline ll qp(ll a,ll b){ll ans=1;while(b){if(b&1)ans=ans*a%mod;a=a*a%mod,b>>=1;}return ans;}
inline ll qp(ll a,ll b,ll c){ll ans=1;while(b){if(b&1)ans=mul(ans,a,c);a=mul(a,a,c),b>>=1;}return ans;}

using namespace std;
//using namespace __gnu_pbds;

const ld pi = acos(-1);
const ull ba=233;
const db eps=1e-5;
const ll INF=0x3f3f3f3f3f3f3f3f;
const int N=1000000+10,maxn=2000000+10,inf=0x3f3f3f3f;

struct cd{
    ld x,y;
    cd(ld _x=0.0,ld _y=0.0):x(_x),y(_y){}
    cd operator +(const cd &b)const{
        return cd(x+b.x,y+b.y);
    }
    cd operator -(const cd &b)const{
        return cd(x-b.x,y-b.y);
    }
    cd operator *(const cd &b)const{
        return cd(x*b.x - y*b.y,x*b.y + y*b.x);
    }
    cd operator /(const db &b)const{
        return cd(x/b,y/b);
    }
}a[N<<3];
int rev[N<<3];
void getrev(int bit)
{
    for(int i=0;i<(1<<bit);i++)
        rev[i]=(rev[i>>1]>>1) | ((i&1)<<(bit-1));
}
void fft(cd *a,int n,int dft)
{
    for(int i=0;i<n;i++)
        if(i<rev[i])
            swap(a[i],a[rev[i]]);
    for(int step=1;step<n;step<<=1)
    {
        cd wn(cos(dft*pi/step),sin(dft*pi/step));
        for(int j=0;j<n;j+=step<<1)
        {
            cd wnk(1,0);
            for(int k=j;k<j+step;k++)
            {
                cd x=a[k];
                cd y=wnk*a[k+step];
                a[k]=x+y;a[k+step]=x-y;
                wnk=wnk*wn;
            }
        }
    }
    if(dft==-1)for(int i=0;i<n;i++)a[i]=a[i]/n;
}
int c[N];
int main()
{
    int n,m;scanf("%d%d",&n,&m);
    for(int i=1,x;i<=n;i++)scanf("%d",&x),c[x]++;
    int sz=0;
    while((1<<sz)<=m)sz++;sz++;
    getrev(sz);
    int len=(1<<sz);
    a[0]=1;
    for(int i=1;i<len;i++)a[i]=(i<=m?c[i]:0);
    fft(a,len,1);
    for(int i=0;i<len;i++)a[i]=a[i]*a[i];
    fft(a,len,-1);
    vi ans;
    for(int i=1;i<=m;i++)
    {
        int x=(int)(a[i].x+0.5);
        if(!x)continue;
        if(!c[i])return 0*puts("NO");
        else if(x==2)ans.pb(i);
    }
    puts("YES");
    printf("%d\n",ans.size());
    for(int x:ans)printf("%d ",x);puts("");
    return 0;
}
/********************

********************/


#include<bits/stdc++.h>
using namespace std;
#define ll long long
vector<ll> v;
int main(){
     ll n,m,a[100001],ans=0,s=0,j;
     cin>>n>>m;
     for(int i=1; i<=n; i++){
          cin>>a[i];
     }
     sort(a+1,a+n+1);
     j=1;
     for(ll i=1; i<=m; i++){
         if(i==a[j] && j<=n){
              j++;
         }
         else{
              if(i>a[n]){
                   if(ans+i<=m) {ans+=i;v.push_back(i);}
                   else break;
              }
              if(i<a[j]){
                   if(ans+i<=m) ans+=i;
                   else break;
                   v.push_back(i);
              }

         }
     }
     cout<<v.size()<<endl;
     for(int i=0; i<v.size(); i++){
          cout<<v[i]<<" ";
     }
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
vector<ll> v;
int main(){
     ll n,m,a[100001],ans=0,s=0,j;
     cin>>n>>m;
     for(int i=1; i<=n; i++){
          cin>>a[i];
     }
     sort(a+1,a+n+1);
     j=1;
     for(ll i=1; i<=m; i++){
         if(i==a[j]){
              j++;
         }
         else{
              if(i<a[j]){
                   if(ans+i<=m) ans+=i;
                   else break;
                   v.push_back(i);
              }
              if(i>a[n]){
                   if(ans+i<=m) {ans+=i;v.push_back(i);}
                   else break;
              }
         }
     }
     cout<<v.size()<<endl;
     for(int i=0; i<v.size(); i++){
          cout<<v[i]<<" ";
     }
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
vector<ll> v;
int main(){
     ll n,m,a[100001],ans=0,s=0,j;
     cin>>n>>m;
     for(int i=1; i<=n; i++){
          cin>>a[i];
     }
     sort(a+1,a+n+1);
     j=1;
     for(ll i=1; i<=m; i++){
         if(i==a[j] && j<n){
              j++;
         }
         else{
              if(i>a[n]){
                   if(ans+i<=m) {ans+=i;v.push_back(i);}
                   else break;
              }
              if(i<a[j]){
                   if(ans+i<=m) ans+=i;
                   else break;
                   v.push_back(i);
              }

         }
     }
     cout<<v.size()<<endl;
     for(int i=0; i<v.size(); i++){
          cout<<v[i]<<" ";
     }
}


#include<bits/stdc++.h>
using namespace std;
#define ll long long
vector<ll> v;
int main(){
     ll n,m,a[100001],ans=0,s=0,j;
     cin>>n>>m;
     for(int i=1; i<=n; i++){
          cin>>a[i];
     }
     sort(a+1,a+n+1);
     j=1;
     for(ll i=1; i<=m; i++){
         if(i==a[j]){
              j++;
         }
         else{
              if(i>a[n]){
                   if(ans+i<=m) {ans+=i;v.push_back(i);}
                   else break;
              }
              if(i<a[j]){
                   if(ans+i<=m) ans+=i;
                   else break;
                   v.push_back(i);
              }

         }
     }
     cout<<v.size()<<endl;
     for(int i=0; i<v.size(); i++){
          cout<<v[i]<<" ";
     }
}


#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
//#include <intrin.h>

using namespace std;

typedef long long ll;

inline void solve() {
	int n, m;
	cin >> n >> m;
	set<int> st;
	int a;
	for (int i = 0; i < m; i++) {
		cin >> a;
		st.insert(a);
	}

	int cur = 1;
	vector<int> otv;

	while (cur <= m) {
		while (st.find(cur) != st.end())
			cur++;
		if (m >= cur) {
			m -= cur;
			otv.push_back(cur);
			cur++;
		}
	}

	cout << otv.size() << '\n';
	for (int x : otv)
		cout << x << ' ';
}

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
#if defined(_DEBUG)
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	int q = 1;
	//cin >> q;
	for (; q > 0; q--) {
		solve();
		cout << '\n';
	}
}


#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
//#include <intrin.h>

using namespace std;

typedef long long ll;

inline void solve() {
	int n, m;
	cin >> n >> m;
	set<int> st;
	int a;
	for (int i = 0; i < m; i++) {
		cin >> a;
		st.insert(a);
	}

	int cur = 1;
	vector<int> otv;

	while (cur < m) {
		while (st.find(cur) != st.end())
			cur++;
		if (m >= cur) {
			m -= cur;
			otv.push_back(cur);
			cur++;
		}
	}

	cout << otv.size() << '\n';
	for (int x : otv)
		cout << x << ' ';
}

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
#if defined(_DEBUG)
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	int q = 1;
	//cin >> q;
	for (; q > 0; q--) {
		solve();
		cout << '\n';
	}
}


#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
//#include <intrin.h>

using namespace std;

typedef long long ll;

inline void solve() {
	int n, m;
	cin >> n >> m;
	set<int> st;
	int a;
	for (int i = 0; i < n; i++) {
		cin >> a;
		st.insert(a);
	}

	int cur = 1;
	vector<int> otv;

	while (cur <= m) {
		while (st.find(cur) != st.end() && cur <= m)
			cur++;
		if (m >= cur) {
			m -= cur;
			otv.push_back(cur);
			cur++;
		}
	}

	cout << otv.size() << '\n';
	for (int x : otv)
		cout << x << ' ';
}

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
#if defined(_DEBUG)
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	int q = 1;
	//cin >> q;
	for (; q > 0; q--) {
		solve();
		cout << '\n';
	}
}


#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
//#include <intrin.h>

using namespace std;

typedef long long ll;

inline void solve() {
	int n, m;
	cin >> n >> m;
	set<int> st;
	int a;
	for (int i = 0; i < m; i++) {
		cin >> a;
		st.insert(a);
	}

	int cur = 1;
	vector<int> otv;

	while (cur <= m) {
		while (st.find(cur) != st.end() && cur <= m)
			cur++;
		if (m >= cur) {
			m -= cur;
			otv.push_back(cur);
			cur++;
		}
	}

	cout << otv.size() << '\n';
	for (int x : otv)
		cout << x << ' ';
}

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
#if defined(_DEBUG)
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	int q = 1;
	//cin >> q;
	for (; q > 0; q--) {
		solve();
		cout << '\n';
	}
}


#define _CRT_SECURE_NO_WARNINGS
#include <bits/stdc++.h>
//#include <intrin.h>

using namespace std;

typedef long long ll;

inline void solve() {
	int n, m;
	cin >> m >> n;
	set<int> st;
	int a;
	for (int i = 0; i < m; i++) {
		cin >> a;
		st.insert(a);
	}

	int cur = 1;
	vector<int> otv;

	while (cur <= m) {
		while (st.find(cur) != st.end() && cur <= m)
			cur++;
		if (m >= cur) {
			m -= cur;
			otv.push_back(cur);
			cur++;
		}
	}

	cout << otv.size() << '\n';
	for (int x : otv)
		cout << x << ' ';
}

int main()
{
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
#if defined(_DEBUG)
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	int q = 1;
	//cin >> q;
	for (; q > 0; q--) {
		solve();
		cout << '\n';
	}
}


#include <bits/stdc++.h>

#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long
#define vll vector<ll>
#define vi vector<int>
#define sll(x) scanf("%lld",&x)
#define prll(x) printf("%lld ",x)
#define pri(x) printf("%d ",x)
#define si(x) scanf("%d",&x)
#define el cout << "\n"
#define pb push_back
#define f first
#define s second
#define arrondi(a) (long long)floor(a+0.5);
#define NIL -1
using namespace std;

int main()
{
	IOS;
    cout.precision(30);
    ll n,m;
    cin >> n >> m;
    vector<ll> visited(1e6,0);

    for(int i=0;i<n;i++)
    {
        ll x;
         cin >> x;
         if(x>1e6)
            continue;
        visited[x]=1;
    }
    ll sum=0;
    ll res=0;
    vector<ll> L;
    for(int i=1;i<1e8;i++)
    {
        if(sum+i>m)
            break;
        if(visited[i]==0)
        {
            sum+=i;
            L.push_back(i);
        }

    }
    cout << L.size(); cout << endl;
    for(int i=0;i<L.size();i++)
    {
        cout << L[i] << " " ;
    }

    return 0;
}


#include <bits/stdc++.h>

#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long
#define vll vector<ll>
#define vi vector<int>
#define sll(x) scanf("%lld",&x)
#define prll(x) printf("%lld ",x)
#define pri(x) printf("%d ",x)
#define si(x) scanf("%d",&x)
#define el cout << "\n"
#define pb push_back
#define f first
#define s second
#define arrondi(a) (long long)floor(a+0.5);
#define NIL -1
using namespace std;

int main()
{
	IOS;
    cout.precision(30);
    ll n,m;
    cin >> n >> m;
    vector<ll> visited(1e6,0);

    for(int i=0;i<n;i++)
    {
        ll x;
         cin >> x;
         if(x>1e8)
            continue;
        visited[x]=1;
    }
    ll sum=0;
    ll res=0;
    vector<ll> L;
    for(int i=1;i<1e8;i++)
    {
        if(sum+i>m)
            break;
        if(visited[i]==0)
        {
            sum+=i;
            L.push_back(i);
        }

    }
    cout << L.size(); cout << endl;
    for(int i=0;i<L.size();i++)
    {
        cout << L[i] << " " ;
    }

    return 0;
}


#include <bits/stdc++.h>

#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long
#define vll vector<ll>
#define vi vector<int>
#define sll(x) scanf("%lld",&x)
#define prll(x) printf("%lld ",x)
#define pri(x) printf("%d ",x)
#define si(x) scanf("%d",&x)
#define el cout << "\n"
#define pb push_back
#define f first
#define s second
#define arrondi(a) (long long)floor(a+0.5);
#define NIL -1
using namespace std;

int main()
{
	IOS;
    cout.precision(30);
    ll n,m;
    cin >> n >> m;
    vector<ll> visited(1e8,0);

    for(int i=0;i<n;i++)
    {
        ll x;
         cin >> x;
         if(x>1e8)
            continue;
        visited[x]=1;
    }
    ll sum=0;
    ll res=0;
    vector<ll> L;
    for(int i=1;i<1e8;i++)
    {
        if(sum+i>m)
            break;
        if(visited[i]==0)
        {
            sum+=i;
            L.push_back(i);
        }

    }
    cout << L.size(); cout << endl;
    for(int i=0;i<L.size();i++)
    {
        cout << L[i] << " " ;
    }

    return 0;
}


#include <bits/stdc++.h>

#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define ll long long
#define vll vector<ll>
#define vi vector<int>
#define sll(x) scanf("%lld",&x)
#define prll(x) printf("%lld ",x)
#define pri(x) printf("%d ",x)
#define si(x) scanf("%d",&x)
#define el cout << "\n"
#define pb push_back
#define f first
#define s second
#define arrondi(a) (long long)floor(a+0.5);
#define NIL -1
using namespace std;

int main()
{
	IOS;
    cout.precision(30);
    ll n,m;
    cin >> n >> m;
    vector<ll> visited(n+m+1,0);

    for(int i=0;i<n;i++)
    {
        ll x;
         cin >> x;
        visited[x]=1;
    }
    ll sum=0;
    ll res=0;
    vector<ll> L;
    for(int i=1;i<1e8;i++)
    {
        if(sum+i>m)
            break;
        if(visited[i]==0)
        {
            sum+=i;
            L.push_back(i);
        }

    }
    cout << L.size(); cout << endl;
    for(int i=0;i<L.size();i++)
    {
        cout << L[i] << " " ;
    }

    return 0;
}


#include<iostream>
#include<map>
using namespace std;
long long n,m;
long long x;
const int maxn=1e5+10;
long long ans;

int main()
{

    while (cin >> n >> m)
    {
        map<long long,int>mapp;
        long long a[maxn];
        ans=0;
        for (long long i=0;i<n;i++)
        {
            cin >> x;
            mapp[x]++;
        }
        long long num=0;
        long long j=0;
        for (long long i=1;i<maxn;i++)
        {
            if (mapp[i]==0)
            {
                num=num+i;
                if (num>m) break;
                else
                {
                    a[j++]=i;
                    ans++;
                }

            }
        }
        cout << ans << endl;
        for (long long i=0;i<ans;i++)
            cout << a[i] << " ";
        cout << endl;

    }
    return 0;
}


#include<iostream>
#include<map>
using namespace std;
long long n,m;
long long x;
const int maxn=1e9+10;
long long ans;

int main()
{

    while (cin >> n >> m)
    {
        map<long long,int>mapp;
        long long a[maxn];
        ans=0;
        for (long long i=0;i<n;i++)
        {
            cin >> x;
            mapp[x]++;
        }
        long long num=0;
        long long j=0;
        for (long long i=1;i<maxn;i++)
        {
            if (mapp[i]==0)
            {
                num=num+i;
                if (num>m) break;
                else
                {
                    a[j++]=i;
                    ans++;
                }

            }
        }
        cout << ans << endl;
        for (long long i=0;i<ans;i++)
            cout << a[i] << " ";
        cout << endl;

    }
    return 0;
}


#include<iostream>
#include<map>
using namespace std;
long long n,m;
long long x;
const int maxn=1e5+10;
long long ans;

int main()
{

    while (cin >> n >> m)
    {
        map<long long,int>mapp;
        long long a[maxn];
        ans=0;
        for (int i=0;i<n;i++)
        {
            cin >> x;
            mapp[x]++;
        }
        long long num=0;
        int j=0;
        for (int i=1;i<maxn;i++)
        {
            if (mapp[i]==0)
            {
                num=num+i;
                if (num>m) break;
                else
                {
                    a[j++]=i;
                    ans++;
                }

            }
        }
        cout << ans << endl;
        for (int i=0;i<ans;i++)
            cout << a[i] << " ";
        cout << endl;

    }
    return 0;
}


#include<iostream>
#include<bits/stdc++.h>
using namespace std;
long long n,m;
long long x;
const int maxn=1e5+10;
int main()
{

    while (cin >> n >> m)
    {
        map<long long,int>mapp;
        for (int i=0;i<n;i++)
        {
            cin >> x;
            mapp[x]++;
        }
        long long num=0;
        for (int i=1;i<maxn;i++)
        {
            if (mapp[i]==0)
            {
                num=num+i;
                if (num>m) break;
                else
                    cout << i << " ";
            }
        }
        cout << endl;
    }
    return 0;
}


#include<iostream>
#include<map>
using namespace std;
long long n,m;
long long x;
const int maxn=1e9+10;
long long ans;
#include<vector>

int main()
{

    while (cin >> n >> m)
    {
        vector<long long>s;
        map<long long,int>mapp;
        ans=0;
        for (long long i=0;i<n;i++)
        {
            cin >> x;
            mapp[x]++;
        }
        long long num=0;
        long long j=0;
        for (long long i=1;i<maxn;i++)
        {
            if (mapp[i]==0)
            {
                num=num+i;
                if (num>m) break;
                else
                {
                    s.push_back(i);
                    ans++;
                }

            }
        }
        cout << ans << endl;
        for (long long i=0;i<ans;i++)
            cout << s[i] << " ";
        cout << endl;

    }
    return 0;
}


#include<bits/stdc++.h>

#define ll long long

using namespace std;

int main()
{
    ll n , m;
    cin >> n >> m;

    map < ll , int > mp;

    for(int i = 0 ; i < n ; i++){
        ll x;
        cin >> x;
        mp.insert(make_pair(x , 1));
    }

    vector < ll > ans;
    int i = 1;
    ll pr = 0;
    while(pr + i <= m){
        map < ll , int > ::iterator it;
        it = mp.find(i);
        if(it == mp.end()){
            pr += i;
            ans.push_back(i);
        }
        i++;
    }
    cout << ans.size() << endl;
    for(int i = 0 ; i < ans.size() ; i++){
        cout << ans[i] << " ";
    }
    cout << endl;

}


#include<bits/stdc++.h>

#define ll long long
#define types 100005

using namespace std;

int main()
{
    ll n , m;
    cin >> n >> m;

    vector < ll > taken(types , 0);

    for(int i = 0 ; i < n ; i++){
        ll x;
        cin >> x;
        taken[x] = 1;
    }

    vector < ll > ans;
    int i = 1;
    ll pr = 0;
    while(pr + i <= m){
        if(!taken[i]){
            pr += i;
            ans.push_back(i);
        }
        i++;
    }
    cout << ans.size() << endl;
    for(int i = 0 ; i < ans.size() ; i++){
        cout << ans[i] << " ";
    }
    cout << endl;

}


#include<bits/stdc++.h>

#define ll long long
#define types 10005

using namespace std;

int main()
{
    ll n , m;
    cin >> n >> m;

    vector < int > taken(types , 0);

    for(int i = 0 ; i < n ; i++){
        ll x;
        cin >> x;
        taken[x] = 1;
    }

    vector < int > ans;
    int i = 1;
    ll pr = 0;
    while(pr + i <= m){
        if(!taken[i]){
            pr += i;
            ans.push_back(i);
        }
        i++;
    }
    cout << ans.size() << endl;
    for(int i = 0 ; i < ans.size() ; i++){
        cout << ans[i] << " ";
    }
    cout << endl;

}


#include<bits/stdc++.h>

#define ll long long
#define types 1000000005

using namespace std;

int main()
{
    ll n , m;
    cin >> n >> m;

    vector < ll > taken(types , 0);

    for(int i = 0 ; i < n ; i++){
        ll x;
        cin >> x;
        taken[x] = 1;
    }

    vector < ll > ans;
    int i = 1;
    ll pr = 0;
    while(pr + i <= m){
        if(!taken[i]){
            pr += i;
            ans.push_back(i);
        }
        i++;
    }
    cout << ans.size() << endl;
    for(int i = 0 ; i < ans.size() ; i++){
        cout << ans[i] << " ";
    }
    cout << endl;

}


#include<bits/stdc++.h>

#define ll long long
#define types 100005

using namespace std;

int main()
{
    ll n , m;
    cin >> n >> m;

    vector < int > taken(types , 0);

    for(int i = 0 ; i < n ; i++){
        ll x;
        cin >> x;
        taken[x] = 1;
    }

    vector < int > ans;
    int i = 1;
    ll pr = 0;
    while(pr + i <= m){
        if(!taken[i]){
            pr += i;
            ans.push_back(i);
        }
        i++;
    }
    cout << ans.size() << endl;
    for(int i = 0 ; i < ans.size() ; i++){
        cout << ans[i] << " ";
    }
    cout << endl;

}


#include <bits/stdc++.h>

using namespace std;

unordered_set <long long> have;
vector <long long> toBuy;

int main()
{
    long long n, m, t, k = 0;
    cin >> n >> m;
    for (long long i=0; i<n; i++) {
        cin >> t;
        have.insert(t);
    }

    for (long long i=1; m-i>=0; i++) {
        if ( have.count(i) == 0 ) {
            k++;
            toBuy.push_back(i);
            m -= i;
        }
    }

    cout << k << endl;
    for (long long i=0; i<toBuy.size(); i++)
        cout << toBuy[i] << " ";

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

set <long long> have;
vector <long long> toBuy;

int main()
{
    long long n, m, t, k = 0;
    cin >> n >> m;
    for (long long i=0; i<n; i++) {
        cin >> t;
        have.insert(t);
    }

    for (long long i=1; m-i>=0; i++) {
        if ( have.find(i) == have.end() ) {
            k++;
            toBuy.push_back(i);
            m -= i;
        }
    }

    cout << k << endl;
    for (long long i=0; i<toBuy.size(); i++)
        cout << toBuy[i] << " ";

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

set <long long> have;
vector <long long> toBuy;

int main()
{
    long long n, m, t, k = 0;
    cin >> n >> m;
    for (long long i=0; i<n; i++) {
        cin >> t;
        have.insert(t);
    }

    for (long long i=1; m-i>=0 && i<=1000000000; i++) {
        if ( have.find(i) == have.end() ) {
            k++;
            toBuy.push_back(i);
            m -= i;
        }
    }

    cout << k << endl;
    for (long long i=0; i<toBuy.size(); i++)
        cout << toBuy[i] << " ";

    return 0;
}


#include <bits/stdc++.h>

using namespace std;

unordered_set <long long> have;
vector <long long> toBuy;

int main()
{
    long long n, m, t, k = 0;
    cin >> n >> m;
    for (long long i=0; i<n; i++) {
        cin >> t;
        have.insert(t);
    }

    for (long long i=1; m-i>=0 && i<=1000000000; i++) {
        if ( have.find(i) == have.end() ) {
            k++;
            toBuy.push_back(i);
            m -= i;
        }
    }

    cout << k << endl;
    for (long long i=0; i<toBuy.size(); i++)
        cout << toBuy[i] << " ";

    return 0;
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long int n,m;
	cin>>n>>m;
	vector <long long int> v(n),v2(0);
	for(long long int i=0;i<n;++i)
	{
		cin>>v[i];
	}
	bool a[200000];
	memset(a,true,sizeof(a));
	for(long long int i=0;i<n;++i)
	{
		a[v[i]]=false;
	}
	long long int j=1,c=0,sum=0;
	while(sum<=m)
	{
	    if(a[j]==true)
	    {
	        sum+=j;
	        v2.push_back(j);
	        ++c;
	    }
	    ++j;
	}
	--c;
	sum-=j;
	cout<<c<<endl;
	for(long long int i=0;i<c;++i)
	{
	    cout<<v2[i]<<" ";
	}

}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long int n,m,sum=0;
	cin>>n>>m;
	vector <long long int> v(n),v1(0);
	for(long long int i=0;i<n;++i)
	{
		cin>>v[i];
	}
	sort(v.begin(),v.end());
	long long int k=0;
	for(long long int p=1;sum<=m;++p)
	{
		if(p!=v[k])
		{
			sum+=p;
			v1.push_back(p);
		}
		else
		{
			++k;
		}
	 }
	 long long int l=v1.size()-1;
	 cout<<l<<endl;
	 for(long long int i=0;i<l;++i)
	 {
	 	cout<<v1[i]<<" ";
	 }

}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long int n,m,c=0,d=0,sum=0;
	cin>>n>>m;

	vector <long long int> v(n),v1(1000000000),v2(0);
	for(long long int i=0;i<n;++i)
	{
		cin>>v[i];
		v1[v[i]]=1;

	}
	long long int i=1;
	while(d==0)
	{
		if(v1[i]!=1)
		{
			sum+=i;
			v2.push_back(i);
			++c;
		}
		if(sum>m)
		{
			sum-=i;

			--c;
			++d;
		}
		else if(sum==m)
		{
			++d;
		}
		++i;
	}
	cout<<c<<endl;
	for(long long int i=0;i<c;++i)
	{
		cout<<v2[i]<<" ";
	}
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long int n,m,c=0,d=0,sum=0;
	cin>>n>>m;
	long long int max=0;
	vector <long long int> v(n),v2(0);
	for(long long int i=0;i<n;++i)
	{
		cin>>v[i];
		if(v[i]>max)
		{
			max=v[i];
		}
	}
	vector <long long int> v1(max);
		for(long long int i=0;i<n;++i)
	{
		v1[v[i]]=1;
	}

	long long int i=1;
	while(d==0)
	{
		if(v1[i]!=1)
		{
			sum+=i;
			v2.push_back(i);
			++c;
		}
		if(sum>m)
		{
			sum-=i;

			--c;
			++d;
		}
		else if(sum==m)
		{
			++d;
		}
		++i;
	}
	cout<<c<<endl;
	for(long long int i=0;i<c;++i)
	{
		cout<<v2[i]<<" ";
	}
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long int n,m,e=0,sum=0,d=0;
	cin>>n>>m;
	vector <long long int> v(n),v1(0);
	for(long long int i=0;i<n;++i)
	{
		cin>>v[i];
	}
	long long int k=1;
	for(long long int i=0;i<n && e==0;++i)
	{
		while(k<v[i])
		{
			v1.push_back(k);
			sum+=k;
			++d;
			if(sum>m)
			{
				++e;
				--d;
			}
		}
		k=v[i]+1;

	}
	cout<<d<<endl;
	for(long long int i=0;i<d;++i)
	{
		cout<<v1[i]<<" ";
	}
}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long int n,m;
	cin>>n>>m;
	vector <long long int> v(n),v2(0);
	for(long long int i=0;i<n;++i)
	{
		cin>>v[i];
	}
	bool a[200000];
	memset(a,true,sizeof(a));
	for(long long int i=0;i<n;++i)
	{
		a[v[i]]=false;
	}
	long long int j=1,c=0,sum=0;
	while(sum<=m   && c<=100000)
	{
	    if(a[j]==true)
	    {
	        sum+=j;
	        v2.push_back(j);
	        ++c;
	    }
	    ++j;
	}
	--c;
	sum-=j;
	cout<<c<<endl;
	for(long long int i=0;i<c;++i)
	{
	    cout<<v2[i]<<" ";
	}

}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long int n,m;
	cin>>n>>m;
	vector <long long int> v(n),v2(0);
	for(long long int i=0;i<n;++i)
	{
		cin>>v[i];
	}
	bool a[200000];
	memset(a,true,sizeof(a));
	for(long long int i=0;i<n;++i)
	{
		a[v[i]]=false;
	}
	long long int j=1,c=0,sum=0;
	while(sum<=m)
	{
	    if(a[j]==true  && j<=100000)
	    {
	        sum+=j;
	        v2.push_back(j);
	        ++c;
	    }
	    ++j;
	}
	--c;
	sum-=j;
	cout<<c<<endl;
	for(long long int i=0;i<c;++i)
	{
	    cout<<v2[i]<<" ";
	}

}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long int n,m;
	cin>>n>>m;
	vector <long long int> v(n),v2(0);
	for(long long int i=0;i<n;++i)
	{
		cin>>v[i];
	}
	bool a[1000000000];
	memset(a,true,sizeof(a));
	for(long long int i=0;i<n;++i)
	{
		a[v[i]]=false;
	}
	long long int j=1,c=0,sum=0;
	while(sum<=m)
	{
	    if(a[j]==true)
	    {
	        sum+=j;
	        v2.push_back(j);
	        ++c;
	    }
	    ++j;
	}
	--c;
	sum-=j;
	cout<<c<<endl;
	for(long long int i=0;i<c;++i)
	{
	    cout<<v2[i]<<" ";
	}

}


#include<bits/stdc++.h>
using namespace std;
int main()
{
	long long int n,m;
	cin>>n>>m;
	vector <long long int> v(n),v2(0);
	for(long long int i=0;i<n;++i)
	{
		cin>>v[i];
	}
	bool a[200000];
	memset(a,true,sizeof(a));
	for(long long int i=0;i<n;++i)
	{
		a[v[i]]=false;
	}
	long long int j=1,c=0,sum=0;
	while(sum<=m && J<=100000)
	{
	    if(a[j]==true)
	    {
	        sum+=j;
	        v2.push_back(j);
	        ++c;
	    }
	    ++j;
	}
	--c;
	sum-=j;
	cout<<c<<endl;
	for(long long int i=0;i<c;++i)
	{
	    cout<<v2[i]<<" ";
	}

}


#include<bits/stdc++.h>
using namespace std;
#define lli long long int
#define print(x) cout<<x<<"\n"
#define cases() int tc;cin>>tc;while(tc--)
#define For(i,start,end) for(int i=start;i<end;i++)
#define pb push_back
#define fastaf ios_base::sync_with_stdio(false); cin.tie(NULL);
#define sort(v) sort(v.begin(),v.end())
#define limit 100000

int main(){
fastaf;

lli visited[limit];
memset(visited,false,sizeof(visited));

lli n,m,toy;cin>>n>>m;
For(i,0,n){
    cin>>toy;
    if(toy<limit) visited[toy]=true;
}

vector<lli> toys;
For(i,1,limit){
    if(visited[i]) continue;
    if(m-i<0) break;
    m-=i;
    toys.pb(i);
}

print(toys.size());
for(auto i:toys) cout<<i<<" ";

return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define lli long long int
#define print(x) cout<<x<<"\n"
#define cases() int tc;cin>>tc;while(tc--)
#define For(i,start,end) for(int i=start;i<end;i++)
#define pb push_back
#define fastaf ios_base::sync_with_stdio(false); cin.tie(NULL);
#define sort(v) sort(v.begin(),v.end())
#define limit 2000001

int main(){
fastaf;

bool visited[limit];
memset(visited,false,sizeof(visited));

lli n,m,toy;cin>>n>>m;
For(i,0,n){
    cin>>toy;
    if(toy<limit) visited[toy]=true;
}

vector<lli> toys;
For(i,1,limit){
    if(visited[i]) continue;
    if(m-i<0) break;
    m-=i;
    toys.pb(i);
}

print(toys.size());
for(auto i:toys) cout<<i<<" ";

return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define lli long long int
#define print(x) cout<<x<<"\n"
#define cases() int tc;cin>>tc;while(tc--)
#define For(i,start,end) for(int i=start;i<end;i++)
#define pb push_back
#define fastaf ios_base::sync_with_stdio(false); cin.tie(NULL);
#define sort(v) sort(v.begin(),v.end())
#define limit 100001

int main(){
fastaf;

lli visited[limit];
memset(visited,false,sizeof(visited));

lli n,m,toy;cin>>n>>m;
For(i,0,n){
    cin>>toy;
    if(toy<limit) visited[toy]=true;
}

vector<lli> toys;
For(i,1,limit){
    if(visited[i]) continue;
    if(m-i<0) break;
    m-=i;
    toys.pb(i);
}

print(toys.size());
for(auto i:toys) cout<<i<<" ";

return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define lli long long int
#define print(x) cout<<x<<"\n"
#define cases() int tc;cin>>tc;while(tc--)
#define For(i,start,end) for(int i=start;i<end;i++)
#define pb push_back
#define fastaf ios_base::sync_with_stdio(false); cin.tie(NULL);
#define sort(v) sort(v.begin(),v.end())
#define limit 1000001

int main(){
fastaf;

bool visited[limit];
memset(visited,false,sizeof(visited));

lli n,m,toy;cin>>n>>m;
For(i,0,n){
    cin>>toy;
    if(toy<limit) visited[toy]=true;
}

vector<lli> toys;
For(i,1,limit){
    if(visited[i]) continue;
    if(m-i<0) break;
    m-=i;
    toys.pb(i);
}

print(toys.size());
for(auto i:toys) cout<<i<<" ";

return 0;
}


// http://codeforces.com/problemset/problem/659/C
#include<iostream>
#include<vector>
#include<algorithm>

using namespace std;

int binarySearch(long long int arr[], int l, int r, long long int x)
{
	if(l<=r)
	{
		int mid = (l+r)/2;
		if(arr[mid] == x)
		{
			return 1;
		}
		else if (arr[mid]>x)
		{
			r = mid - 1;
			return binarySearch(arr,l,r,x);
		}
		else
		{
			l = mid + 1;
			return binarySearch(arr,l,r,x);
		}
	}
	return 0;
}

int main()
{
	int n, removed;
	long long int m, totalCost, input, count;
	cin>>n>>m;
	long long int a[n];
	vector<long long int> bought;
	removed = 0;
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
	}
	sort(a,a+n);
	totalCost = input = count = 0;
	while(input <= m)
	{
		input++;
		if(!binarySearch(a,0,n-1,input))
		{
			if(totalCost + input > m)
			{
				break;
			}
			else
			{
				totalCost += input;
				bought.push_back(input);
				count++;
			}
		}
	}
	cout<<count<<endl;
	for(int i=0;i<bought.size();i++)
	{
	 	cout<<bought[i]<<" ";
	}
	return 0;
}


// http://codeforces.com/problemset/problem/659/C
#include<iostream>
#include<vector>

using namespace std;

int binarySearch(long long int arr[], int l, int r, long long int x)
{
	if(l<=r)
	{
		int mid = (l+r)/2;
		if(arr[mid] == x)
		{
			return 1;
		}
		else if (arr[mid]>x)
		{
			r = mid - 1;
			return binarySearch(arr,l,r,x);
		}
		else
		{
			l = mid + 1;
			return binarySearch(arr,l,r,x);
		}
	}
	return 0;
}

int main()
{
	int n, removed;
	long long int m, totalCost, input, count;
	cin>>n>>m;
	long long int a[n];
	vector<long long int> bought;
	removed = 0;
	for(int i=0;i<n;i++)
	{
		cin>>input;
		int j = i - 1;
		while(j >= 0 && a[j] > input)
		{
			a[j+1] = a[j];
			j--;
		}
		a[j+1] = input;
	}
	totalCost = input = count = 0;
	while(input <= m)
	{
		input++;
		if(!binarySearch(a,0,n-1,input))
		{
			if(totalCost + input > m)
			{
				break;
			}
			else
			{
				totalCost += input;
				bought.push_back(input);
				count++;
			}
		}
	}
	cout<<count<<endl;
	for(int i=0;i<bought.size()-1;i++)
	{
	 	cout<<bought[i]<<" ";
	}
	cout<<bought[bought.size()-1]<<endl;
	return 0;
}


// http://codeforces.com/problemset/problem/659/C
#include<iostream>
#include<algorithm>

using namespace std;

int main()
{
	int n, count, sub;
	long long int m;
	cin>>n>>m;
	long long int ans, sum;
	ans = sum = 0;
	while((ans*(ans+1))/2 <=m)
	{
		ans++;
	}
	ans--;
	sum = (ans*(ans+1))/2;
	long long int a[n];
	sub = 0;
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
		if (a[i]<=ans)
		{
			sum = sum - (a[i]);
			sub++;
			if (sum + ans + 1 <= m)
			{
				ans++;
				sum = sum + ans;
			}
		}
	}
	sort(a,a+n);
	cout<<ans-sub<<endl;
	count = 0;
	for(int i=1;i<=ans;i++)
	{
		if(i == a[count])
		{
			count++;
			continue;
		}
		cout<<i<<" ";
	}
	return 0;
}


// http://codeforces.com/problemset/problem/659/C
#include<iostream>

using namespace std;

int binarySearch(long long int arr[], int l, int r, long long int x)
{
	if(l<=r)
	{
		int mid = (l+r)/2;
		if(arr[mid] == x)
		{
			return 1;
		}
		else if (arr[mid]>x)
		{
			r = mid - 1;
			binarySearch(arr,l,r,x);
		}
		else
		{
			l = mid + 1;
			binarySearch(arr,l,r,x);
		}
	}
	return 0;
}

int main()
{
	int n, removed;
	long long int m, totalCost, minIndex, input, temp;
	totalCost = 0;
	minIndex = 0;
	cin>>n>>m;
	while(totalCost <= m)
	{
		minIndex++;
		totalCost += minIndex;
	}
	totalCost -= minIndex;
	long long int a[n];
	removed = 0;
	for(int i=0;i<n;i++)
	{
		cin>>input;
		int j = i - 1;
		while(j >= 0 && a[j] > input)
		{
			a[j+1] = a[j];
			j--;
		}
		a[j+1] = input;
		if (input == minIndex)
		{
			temp = minIndex;
			while(temp <=m)
			{
				temp++;
				if(!binarySearch(a,0,i,temp))
				{
					break;
				}
			}
			if (temp<=m)
			{
				minIndex = temp;
			}
			else
			{
				minIndex = m+1;
			}
			removed++;
		}
		else if(input<minIndex)
		{
			totalCost -= input;
			temp = minIndex;
			removed++;
			while(totalCost+temp<=m)
			{
				if(!binarySearch(a,0,i,temp))
				{
					minIndex = temp + 1;
					totalCost+=temp;
					break;
				}
				else
				{
					temp++;
				}
			}
		}
	}
	int count = 0;
	cout<<minIndex-removed-1<<endl;
	for(int i=1;i<minIndex;i++)
	{
		if(a[count] == i)
		{
			count++;
		}
		else
		{
			cout<<i<<" ";
		}
	}
	return 0;
}


// http://codeforces.com/problemset/problem/659/C
#include<iostream>
#include<vector>
#include<algorithm>

using namespace std;

int binarySearch(long long int arr[], int l, int r, long long int x)
{
	if(l<=r)
	{
		int mid = (l+r)/2;
		if(arr[mid] == x)
		{
			return 1;
		}
		else if (arr[mid]>x)
		{
			r = mid - 1;
			return binarySearch(arr,l,r,x);
		}
		else
		{
			l = mid + 1;
			return binarySearch(arr,l,r,x);
		}
	}
	return 0;
}

int main()
{
	int n, removed;
	long long int m, totalCost, input, count;
	cin>>n>>m;
	long long int a[n];
	vector<long long int> bought;
	removed = 0;
	for(int i=0;i<n;i++)
	{
		cin>>a[i];
	}
	sort(a,a+n);
	totalCost = input = count = 0;
	while(input <= m)
	{
		input++;
		if(!binarySearch(a,0,n-1,input))
		{
			if(totalCost + input > m)
			{
				break;
			}
			else
			{
				totalCost += input;
				bought.push_back(input);
				count++;
			}
		}
	}
	cout<<count<<endl;
	for(int i=0;i<bought.size()-1;i++)
	{
	 	cout<<bought[i]<<" ";
	}
	cout<<bought[bought.size()-1]<<endl;
	return 0;
}


#include<bits/stdc++.h>
using namespace std;
#define ff                first
#define ss                second
#define int               long long
#define pb                push_back
#define mp                make_pair
#define pair              pair<int,int>
#define vi                vector<int>
#define mii               map<int ,int>
#define setbits(x)        _builtin_popcountll(x)
#define zrobits(x)        _builtin_ctzll(x)
#define mod               1000000007
#define inf               1e18
#define ps(x,y)           fixed<<setprecision(y)<<x
#define mk(arr,n,type)    type *arr=new type(n);
#define w(x)              int x; cin>>x; while(x--)
void c_p_c()
{
	ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
	freopen("inp.txt", "r+", stdin);
	freopen("oup.txt", "w+", stdout);
#endif
}
main()
{	c_p_c();
	int n, m;
	cin >> n >> m;
	std::vector<int> v;
	std::map<int, int>map;
	for (int i = 0; i < n; i++)
	{
		int p;
		cin >> p;
		map[p] = p;
	}
	int i = 0;
	int sum = 0;
	while (sum < m)
	{
		if (map[i] != i)
		{
			v.push_back(i);
			sum = sum + i;
		}
		i++;
	}
	if (sum > m)v.pop_back();
	cout << v.size() << "\n";
	for (auto i : v)cout << i << " ";

}