#include <bits/stdc++.h>

using namespace std;

int main() {
    int n, k;
    cin >> n >> k;

    int a[100005];

    for (int i = 0; i < n; i++)
        cin >> a[i];

    bool found = false;

    for (int i = 0; i < n - 1; i++) {
        for (int j = i + 1; j < n; j++) {
            if (a[i] + a[j] == 2 * k) {
                cout << i << " " << j << endl;
                found = true;
            }
        }
    }

    if (!found)
        cout << "NO";

    return 0;
}