#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10, MAX = 1e9 + 10;
const long double eps = 1e-18;
int n, k, h;
pair<pair<int, int>, int> a[N];
long double timE(int dex, int floor) {
  return (floor * 1.) / (1. * a[dex].first.second);
}
bool check(long double *t) {
  int cnt = 0;
  for (int i = 0; i < n; i++)
    if (timE(i, cnt + 1) - *t < eps) cnt++;
  return (cnt >= k);
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> k >> h;
  for (int i = 0; i < n; i++) cin >> a[i].first.first;
  for (int i = 0; i < n; i++) cin >> a[i].first.second;
  for (int i = 0; i < n; i++) a[i].second = i;
  sort(a, a + n);
  long double l = 0, r = MAX;
  for (int i = 0; i < 90; i++) {
    long double c = (l + r) / 2;
    if (check(&c))
      r = c;
    else
      l = c;
  }
  int cnt = k - 1;
  vector<int> ans;
  for (int i = n - 1; cnt >= 0; i--)
    if (timE(i, cnt + 1) - r <= eps) {
      ans.push_back(a[i].second + 1);
      cnt--;
    }
  reverse(ans.begin(), ans.end());
  for (int dex : ans) cout << dex << ' ';
  return 0;
}
