#include<bits/stdc++.h>
using namespace std;
const int N=100005;
int n,p,x,Gcd,a[N];
int main(){
scanf("%d%d",&n,&p);
for (int i=1;i<=n;i++)scanf("%d",&a[i]),Gcd=__gcd(Gcd,a[i]);
sort(a+1,a+n+1);
if (p%Gcd!=0||p>a[n]){
puts("IMPOSSIBLE");
return 0;
}
if (n==1&&a[1]!=p){
puts("IMPOSSIBLE");
return 0;
}
puts("POSSIBLE");
return 0;
}
./Main.cpp: In function ‘int main()’:
./Main.cpp:6:21: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&n,&p);
^
./Main.cpp:7:61: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
for (int i=1;i<=n;i++)scanf("%d",&a[i]),Gcd=__gcd(Gcd,a[i]);
^