#include <iostream>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <algorithm>
#include <math.h>
#include <cassert>
#define rep(i,n) for(int i = 0; i < n; ++i )
using namespace std;
using ll = long long;

const int p[] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71};
const int m = 20;
ll dp[1<<m];
int main() {
  ll a,b;
  cin >> a >> b;
  int n = b-a+1;
  vector<int> v(n);
  for(ll i=a;i<=b;++i)rep(j,m) if(i%p[j]==0) v[i-a] |= 1<<j;

  dp[0] = 1;
  rep(i,n)rep(x,1<<m){
    if(x&v[i]) continue;
    dp[x|v[i]] += dp[x];
  }
  ll ans = 0;
  rep(x,1<<m) ans += dp[x];
  cout << ans << endl;
}

#include <bits/stdc++.h>

int ri() {
	int n;
	scanf("%d", &n);
	return n;
}

int main() {
	int n = ri();
	int x = ri();
	int a[n];
	for (auto &i : a) i = ri();
	
	bool beginning = true;
	for (int i = 0; i < n; i++) {
		if (a[i] == x) continue;
		if (beginning) beginning = false;
		else printf(" ");
		printf("%d", a[i]);
	}
	puts("");
	return 0;
}


