Răspuns:
#include <iostream>
using namespace std;
int i,j,ok;
void perechi (int n)
{
for(i=1; i<=n; i++)
{
for(j=n; j>=i; j--)
if(((i%2==0 && j%2!=0) || (i%2!=0 && j%2==0)) && i*j==n)
{
ok=1;
cout<<"["<<i<<" "<<j<<"]";
}
}
if(ok==0)
cout<<"nu exista";
}