#include <bits/stdc++.h>
using namespace std;
int gcd(int a, int b) { return (b != 0 ? gcd(b, a % b) : a); }
int lcm(int a, int b) { return (a / gcd(a, b) * b); }
int R[] = {1, -1, 0, 0, 1, -1, -1, 1};
int C[] = {0, 0, 1, -1, 1, -1, 1, -1};
int KR[] = {-2, -2, -1, 1, 2, 2, -1, 1};
int KC[] = {1, -1, 2, 2, 1, -1, -2, -2};
struct P {
  double x, y;
  P(double x = 0.0, double y = 0.0) {
    this->x = x;
    this->y = y;
  }
};
P mkv(P ae, P be) { return P(be.x - ae.x, be.y - ae.y); }
double dtp(P ae, P be) { return (ae.x * be.x + ae.y * be.y); }
double crp(P ae, P be) { return (ae.x * be.y - ae.y * be.x); }
double val(P ae) { return sqrt(dtp(ae, ae)); }
P vresize(P ae, double llen) {
  double v = val(ae);
  return P(ae.x * llen / v, ae.y * llen / v);
}
double ART(P ae, P be) { return crp(ae, be) / 2.0; }
P rot(P ae, double ang) {
  return P(ae.x * cos(ang) - ae.y * sin(ang),
           ae.y * cos(ang) + ae.x * sin(ang));
}
struct st {
  long long v, w, ind;
} ar[1000005];
vector<long long> v;
bool cmp(st a, st b) {
  if (a.w == b.w)
    return (a.v < b.v) ? true : false;
  else
    return (a.w < b.w) ? true : false;
}
long long sm, k, n, maxx;
long long check(double m) {
  long long i, cnt = 0, j;
  double d, tm;
  d = (double)sm;
  v.clear();
  for (i = 0, j = 1; i < n && j <= k; i++) {
    d = (double)j * (double)sm;
    tm = (d / (double)ar[i].v);
    if (tm > m)
      continue;
    else {
      v.push_back(ar[i].ind);
      j++;
    }
  }
  if (j == k + 1)
    return 1;
  else
    return 0;
}
int main() {
  long long b, c, p, x = 0, y, i, j, q, r, t, cnt;
  while (scanf("%I64d %I64d %I64d", &n, &k, &sm) == 3) {
    ++x;
    for (i = 0; i < n; i++) {
      scanf("%I64d", &p);
      ar[i].w = p;
      ar[i].ind = i + 1;
    }
    for (i = 0; i < n; i++) {
      scanf("%I64d", &p);
      ar[i].v = p;
    }
    sort(ar, ar + n, cmp);
    double l = 0.0;
    double tm, hm;
    double h = hm = (double)10e12;
    double m;
    for (i = 0; i <= 200; i++) {
      m = (l + h) / 2.0;
      p = check(m);
      if (p == 1) {
        h = m;
        hm = m;
      } else
        l = m;
    }
    check(h);
    for (i = 0; i < v.size(); i++) {
      if (i > 0) printf(" ");
      printf("%I64d", v[i]);
    }
    printf("\n");
  }
  return 0;
}
