#include<bits/stdc++.h>
using namespace std;
const int N=1000000000;
int cost[2001];
int main()
{
int n,l;
cin>>n>>l;
cost[0]=0;
for(int i=1;i<=l;i++)
{
cost[i]=N;
}
for(int i=0;i<=n;i++)
{
int c,l;
cin>>c>>l;
for(int j=l;j>=0;j++)
{
cost[j]=min(cost[j],cost[max(j-1,0)]+c);
}
}
if(cost[l]=N) cout<<"no solution";
else cout<<cost[l];
return 0;
}