#include <cstdio>
#include <string>
using namespace std;
int n;
double K;
int *best;
struct Building
  {
  double a,b;
  int id;
  };
Building *A;
bool *w;
double res;
int *a;

void go(int depth,double sum)
{
int i;
if (depth == n)
  {
  if (sum > res)
    {
    res = sum;
    for(i=0;i<n;i++) best[i] = a[i];
    }
  return;
  }
for(i=0;i<n;i++) if (!w[i])
  {
  w[i] = true;
  double ns = sum * A[i].a - A[i].b;
  a[depth] = i;
  go(depth+1,ns);
  w[i] = false;
  }
}

void Test()
{
int i;
best = new int[n];
a = new int[n];
A = new Building[n];
w = new bool[n];
for(i=0;i<n;i++)
  {
  scanf("%lf%lf",&A[i].a,&A[i].b);
  A[i].id = i+1;
  w[i] = false;
  }
res = -1e100;
go(0,K);
for(i=0;i<n;i++)
  {
  printf("%d\n",best[i]+1);
  }
delete[] w;
delete[] best;
delete[] A;
delete[] a;
}

int main()
{
int TestNo=0;
freopen("governor.in","r",stdin);
freopen("governor.out","w",stdout);
while(2==scanf("%d%lf",&n,&K))
  {
  if (TestNo++) puts("");
  Test();
  }
return 0;
}
