#include <bits/stdc++.h>
using namespace std;
using ll = long long;

template<class T> istream& operator >> (istream& is, vector<T>& vec) {
    for(T& x : vec) is >> x;
    return is;
}

template<class T> ostream& operator << (ostream& os, const vector<T>& vec) {
    if(vec.empty()) return os;
    os << vec[0];
    for(auto it = vec.begin(); ++it != vec.end(); ) os << ' ' << *it;
    return os;
}

int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    ll n, k;
    cin >> n >> k;
    vector<ll> a(n);
    cin >> a;

    ll ng = 0, ok = 1ll << 60, mid;
    while(ng + 1 < ok){
        mid = (ok + ng) / 2;
        int cnt = 0;
        for(int i = 0; i < n; i++){
            cnt += a[i] < mid;
        }
        (cnt >= k ? ok : ng) = mid;
    }
    vector<int> ans;
    for(int i = 0; i + 1 < n; i++){
        if(a[i] < ok && ok <= a[i + 1]) ans.push_back(i + 2);
    }
    cout << ans.size() << '\n' << ans << '\n';
}