Help me in solving LEVY problem

My issue

My code

#include <iostream>
#include <bits/stdc++.h>
#define rep(i,a,b) for(int i=a;i<b;i++)
#define ff first
#define ss second 
// #define int long long
using namespace std;

signed main() {
	int t;
	std::cin >> t;
	while(t--){
	// your code goes here
	    
	
	}
	return 0;
}

Problem Link: LEVY Problem - CodeChef

Use sieve method to generate a list of primes upto 10^4
Then, simply use two pointer approach to get the answer.