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

int main()
{
  int a,b,c,d,e,f,g,h,i,j,k,l,m,n,t,prothom,boro;
  cin>>n>>k;

   cin>>a;

  boro=a;

  for(int i=1;i<n;i++)
{
    cin>>b;
    a=__gcd(a,b);
    boro=max(boro,b);
}
  if(k<=boro && k%a==0)
    {
    cout<<"POSSIBLE"<<endl;
  }
  else
  {
    cout<<"IMPOSSIBLE"<<endl;
  }

}

#include <iostream>
#include <string>
#include <algorithm>
using namespace std;

int main()
{
	string s, c, p;
	int q, a, b;

	cin >> s >> q;
	while (q--) {
		cin >> c >> a >> b;
		int l = b - a + 1;
		if (c == "print")
			cout << s.substr(a, l) << endl;
		else if (c == "reverse")
			reverse(s.begin() + a, s.begin() + b + 1);
		else {
			cin >> p;
			s = s.replace(a, l, p);
		}
	}

	return 0;
}
