// Original C++ solution (slower):
#include<iostream>

#include<queue>

#include<map>

#include<set>

#include<algorithm>

using namespace std;

#define MAX 14

#define SMAX (1<<14)

#define QMAX 17000



class State{

    public:

    int used, n, size, cost, remain;

    State( int n=0, int size=0):n(n), size(size){

	used = 0;

	cost = 0;

	remain = n;

    }

    State( int n, int size, int cost, int remain): n(n), size(size), cost(cost), remain(remain){}



    bool operator < ( const State &s) const{

	return used < s.used;

    }

};



int n, m;

pair<int, int> F[MAX];

int head, tail;



void rec(State &u, State &v, int pos, int fsize, State Q[QMAX], set<State> &visited){

    if ( pos == n ){

	v.size += fsize;



	if ( visited.insert(v).second ){

	    //	if ( !visited[v] ){

	    //	    visited[v] = true;

	    v.cost = u.cost + 1;

	    //Q.push(v);

	    Q[tail++] = v;

	}

	return;

    }



    if ( !(v.used & (1<<pos)) && v.size >= F[pos].second) {

	State vv = v;

	vv.used |= (1<<pos);

	vv.remain--;

	vv.size -= F[pos].second;

	rec(u, vv, pos+1, fsize + F[pos].first, Q, visited );

    }



    rec(u, v, pos+1, fsize, Q, visited);

}



int bfs(){

    State s = State(n, m);

    //queue<State> Q;

    static State Q[QMAX];

    head = tail = 0;

    //    map<State, bool> visited;

    set<State> visited;



    //Q.push(s);

    Q[tail++] = s;

    //visited[s] = true;

    visited.insert(s);



    State u, v;

    //    while( !Q.empty() ){

    while( head < tail ){

	//u = Q.front(); Q.pop();

	u = Q[head++];

	if ( u.remain == 0 ) return u.cost;

	rec(u, u, 0, 0, Q, visited);

	

    }



    return -1;

}



void compute(){

    int cost = bfs();

    if ( cost < 0 ) cout << "Impossible" << endl;

    else cout << cost << endl;

}



main(){

    while( cin >> n >> m && n ){

	for ( int i = 0; i < n; i++ ) cin >> F[i].first >> F[i].second;

	compute();

    }

}

// Optimized solution to the same problem (faster):
#include<iostream>

#include<queue>

#include<map>

#include<set>

#include<algorithm>

using namespace std;

#define MAX 14

#define SMAX (1<<14)

#define QMAX 17000



class State{

    public:

    int used, n, size, cost, remain;

    State( int n=0, int size=0):n(n), size(size){

	used = cost = 0;

	remain = n;

    }

};



int n, m;

pair<int, int> F[MAX];



void rec(State &u, State &v, int pos, int fsize, queue<State> &Q, bool visited[SMAX]){

    if ( pos == n ){

	v.size += fsize;

	if ( !visited[v.used] ){

	    visited[v.used] = true;

	    v.cost = u.cost + 1;

	    Q.push(v);

	}

	return;

    }



    if ( !(v.used & (1<<pos)) && v.size >= F[pos].second) {

	State vv = v;

	vv.used |= (1<<pos);

	vv.remain--;

	vv.size -= F[pos].second;

	rec(u, vv, pos+1, fsize + F[pos].first, Q, visited );

    }



    rec(u, v, pos+1, fsize, Q, visited);

}



int bfs(){

    State s = State(n, m);

    queue<State> Q;

    bool visited[SMAX];

    Q.push(s);



    for ( int i = 0; i < (1<<n); i++ ) visited[i] = false;

    visited[s.used] = true;



    State u, v;

        while( !Q.empty() ){

	u = Q.front(); Q.pop();

	if ( u.remain == 0 ) return u.cost;

	rec(u, u, 0, 0, Q, visited);

	

    }



    return -1;

}



void compute(){

    int cost = bfs();

    if ( cost < 0 ) cout << "Impossible" << endl;

    else cout << cost << endl;

}



main(){

    while( cin >> n >> m && n ){

	for ( int i = 0; i < n; i++ ) cin >> F[i].first >> F[i].second;

	compute();

    }

}

// Fastest known solution for this problem:
#include <stdio.h>

#include <cmath>

#include <algorithm>

#include <cfloat>

#include <stack>

#include <queue>

#include <vector>

#include <string>

#include <iostream>

#include <set>

#include <map>

#include <time.h>

typedef long long int ll;

typedef unsigned long long int ull;

#define BIG_NUM 2000000000

#define MOD 1000000007

#define EPS 0.000000001

using namespace std;





struct Info{

	int normal,compress;

};





int N,M;

int POW[15];

int min_num[16384];

Info info[14];





void func(){



	for(int i = 0; i < N; i++){

		scanf("%d %d",&info[i].normal,&info[i].compress);

	}



	min_num[0] = 0;

	for(int i = 1; i < POW[N]; i++)min_num[i] = BIG_NUM;



	int ROOM,count,index_table[N];

	int add,compress_size;



	for(int state = 0; state < POW[N]-1; state++){

		if(min_num[state] == BIG_NUM)continue;



		ROOM = M;

		count = 0;



		for(int loop = 0; loop < N; loop++){

			if(state & (1 << loop)){

				ROOM += (info[loop].normal-info[loop].compress);

			}else{

				index_table[count] = loop;

				count++;

			}

		}



		for(int i = 0; i < POW[count]; i++){

			compress_size = 0;

			add = 0;

			for(int loop = 0; loop < count; loop++){

				if(i & (1 << loop)){

					compress_size += info[index_table[loop]].compress;

					if(compress_size > ROOM)continue;

					add += POW[index_table[loop]];

				}



				min_num[state+add] = min(min_num[state+add],min_num[state]+1);

			}

		}

	}



	if(min_num[POW[N]-1] == BIG_NUM){

		printf("Impossible\n");

	}else{

		printf("%d\n",min_num[POW[N]-1]);

	}

}





int main(){



	for(int i = 0; i < 15; i++)POW[i] = pow(2,i);



	while(true){

		scanf("%d %d",&N,&M);

		if(N == 0 && M == 0)break;



		func();

	}



	return 0;

}