#include <iostream>
#include<bits/stdc++.h>
using ll = long long int;
#define fo(i,start,end) for(int i=start;i<end;i++)
using namespace std;
 
int main() {
	// your code goes here
	int arr[] = {1,5,2,4,1} ;
	int k = 4;
	int n = 5;
	fo(i,0,n){
		fo(j,i+1,n){
			if(arr[i] - arr[j] == k){
					cout<<"The pairs are:{"<<i<<","<<j<<"}"<<endl;
					return 0;
			}
		}
	}
	cout<<"No valid pairs found"<<endl;
	return 0;
}