#include <bits/stdc++.h>
using namespace std;
const int MaxN = 100000 + 5;
struct Node {
  int wei, v, lab;
  Node() {}
  Node(int _wei, int _v, int _lab) : wei(_wei), v(_v), lab(_lab) {}
  bool operator<(const Node &t) const {
    if (wei == t.wei) return v < t.v;
    return wei < t.wei;
  }
} frog[MaxN];
int N, K, H;
long double reach[MaxN];
bool cho[MaxN];
bool check(long double mid) {
  for (int i = 0; i < N; ++i) reach[i] = mid * frog[i].v;
  int cnt = 0;
  memset(cho, false, sizeof(cho));
  int tot = 0;
  for (int i = 1; i <= K; ++i) {
    while (cnt < N && reach[cnt] < i) cnt++;
    if (cnt < N && reach[cnt] >= i) {
      cho[cnt] = true;
      tot++;
      cnt++;
    }
  }
  return tot == K;
}
int main() {
  scanf("%d%d%d", &N, &K, &H);
  for (int i = 0; i < N; ++i) scanf("%d", &frog[i].wei);
  for (int i = 0; i < N; ++i) scanf("%d", &frog[i].v);
  for (int i = 0; i < N; ++i) frog[i].lab = i + 1;
  sort(frog, frog + N);
  long double l = 0, r = 100001, mid;
  for (int te = 1; te <= 100; ++te) {
    mid = (l + r) / 2;
    if (check(mid))
      r = mid;
    else
      l = mid;
  }
  mid = r;
  bool fl = true;
  if (!check(mid))
    while (1) {
      mid += 1;
    }
  for (int i = 0; i < N; ++i)
    if (cho[i]) {
      if (fl) {
        fl = false;
        printf("%d", frog[i].lab);
      } else
        printf(" %d", frog[i].lab);
    }
  puts("");
  return 0;
}
