#include <bits/stdc++.h>//Carefully Crafted by hetp111
using namespace std;
#define int long long
#define double long double
#define all(v) (v).begin(),(v).end()
#define vi vector<int>
#define vvi vector<vi>
#define pii pair<int,int>
#define vii vector<pii>
#define MOD 1000000007
#define MOD2 998244353
#define MOD3 1000000009
#define PI acos(-1)
#define eps (1e-8)
#define INF (1e18)
#define FASTER ios_base::sync_with_stdio(0);cin.tie(0)
template<class A,class B>ostream&operator<<(ostream&out,const pair<A,B>&a){return out<<"("<<a.first<<","<<a.second<<")";}
template<class A>ostream&operator<<(ostream&out,const vector<A>&a){for(const A &it:a)out<<it<<" ";return out;}
template<class A,class B>istream&operator>>(istream&in,pair<A,B>&a){return in>>a.first>>a.second;}
template<class A>istream&operator>>(istream&in,vector<A>&a){for(A &i:a)in>>i;return in;}
//ifstream cinn("in.in");ofstream coutt("out.out");
int poww(const int &a,int b,const int &m=MOD){if(b==0)return 1;int x=poww(a,b/2,m);x=x*x%m;if(b&1)x=x*a%m;return x;}
int ceil(const int &a,const int &b){return (a+b-1)/b;}
////Read:
//Check corner cases, n==1;
//
////Some function:
//__builtin_popcountll(), 

int n,c;
vi v;

signed main(){
    FASTER;
    cin>>n>>c;
    v=vi(n);
    for(int &i:v)cin>>i;
    int ans=0;
    for(int i=0;i<=n;i++){
        for(int j=0;j<=n;j++){
            if(i+j>c || i+j>n)continue;
            vi hand;
            int cst=c,sum=0;
            for(int k=0;k<i;k++)hand.push_back(v[k]),cst--,sum+=hand.back();
            for(int k=0;k<j;k++)hand.push_back(v[n-k-1]),cst--,sum+=hand.back();
            sort(all(hand));
            
            for(int i:hand){
                if(i>=0)break;
                if(cst){
                    cst--;
                    sum-=i;
                }
            }
            ans=max(ans,sum);
        }
    }
    cout<<ans;
}

#include <bits/stdc++.h>

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(v) v.begin(), v.end()
#define SP << " " 
#define LLi long long int

using namespace std;

int gcdi(int a, int b) {
	if(a<0) a=b;
	if(b<0) b=a;
    if (b == 0) return a;
    return gcdi(b, a%b);
}

int lcmi(int a, int b) {
    return a/gcdi(a, b)*b;
}

int gcdv(vector<int> gv){
	int tmp=gv[0];
	for(int i=1;i<(int)gv.size();i++) tmp=gcdi(tmp, gv[i]);
	return tmp;
}

int lcmv(vector<int> gv){
	int tmp=gv[0];
	for(int i=1;i<(int)gv.size();i++) tmp=lcmi(tmp, gv[i]);
	return tmp;
}

int main(){

	int n, k, gc;
  	vector<int> v;
	map<LLi, int> mp;
  
  	cin>> n >> k;
  	v.resize(n);
  	rep(i, n){
      	cin>> v[i];
      	if(v[i]==k){
          	cout<< "POSSIBLE" <<endl;
          	return 0;
        }
    }
  
  	gc=gcdv(v);
  	
  	rep(i, n){
      	if(v[i]-k>0 && (v[i]-k)%gc==0){
          	cout<< "POSSIBLE" <<endl;
          	return 0;
        }
    }
  
  	cout<< "IMPOSSIBLE" <<endl;
  
	return 0;
}