Preview:
void solve(int a,vector<int> &ans){
    
    if(a==4){
        ans.push_back(2);
        ans.push_back(2);
        return ;
    }
    
    //mereko even number as a sum of two prime number likhna hai
    for(int k=a-3;k>=3;k-=2){
        if(isPrime(k)&& isPrime(a-k)){
            ans.push_back(k);
            ans.push_back(a-k);
            return  ;
        }
    }
    
    return;
    
}
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter