#include <bits/stdc++.h>
using namespace std;
#define int              long long int
#define double           long double
#define print(a)         for(auto x : a) cout << x << " "; cout << endl


const int M = 1000000007;
const int N = 3e5+9;
const int INF = 2e9+1;
const int LINF = 2000000000000000001;

inline int power(int a, int b, int mod=M) {
    int x = 1;
    a %= mod;
    while (b) {
        if (b & 1) x = (x * a) % mod; 
        a = (a * a) % mod;
        b >>= 1;
    }
    return x;
}


//_ ***************************** START Below *******************************




vector<int> a;


// ---------- Multi set ----------

// Strict Ceil (> x)
int sCeil(multiset<int> &s, int x){

    auto it = s.upper_bound(x);

    if(it == s.end()) return -1;

    return *it;
}

// Strict Floor (< x)
int sFloor(multiset<int> &s, int x){

    auto it = s.lower_bound(x);

    if(it == s.begin()) return -1;
    --it;

    return *it;
}

// Loose Ceil (>= x)
int ceil(multiset<int> &s, int x){

    auto it = s.lower_bound(x);

    if(it == s.end()) return -1;

    return *it;
}

// Loose Floor (<= x)
int floor(multiset<int> &s, int x){

    auto it = s.upper_bound(x);

    if(it == s.begin()) return -1;
    --it;

    return *it;
}



void solve() {

    multiset<int> ms = {2, 5, 3, 6, 10, 22, 6, 6, 3};

    cout << "Multiset => ";
    for(auto x : ms) cout << x << " "; cout << endl;

    int x = 6;

    // Smallest / Largest
    cout << "Smallest(" << x << ")       : " << *ms.begin() << endl;
    cout << "Largest(" << x << ")        : " << *ms.rbegin() << endl;

    // Strict / Loose
    cout << "Strict Ceil (>"  << x << ")  : " << sCeil(ms, x) << endl;
    cout << "Strict Floor (<" << x << ") : " << sFloor(ms, x) << endl;
    cout << "Loose Ceil (>="  << x << ")  : " << ceil(ms, x) << endl;
    cout << "Loose Floor(<="  << x << ")  : " << floor(ms, x) << endl;

    cout << "\n";



}






int32_t main() {
    ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);

    int t = 1;
    // cin >> t;
    while (t--) {
        solve();
    }

    return 0;
}