class Solution {

public:

vector<int> constructRectangle(int area) {

vector<int> res;

res.push_back(area);

res.push_back(1);

int target = 0;

```
for(int l = 1 ; l * l<=area ; l++)
{
if(area % l == 0)
{
res[0] = l;
res[1] = area / l;
}
}
if(res[0] < res[1])
std::swap(res[0],res[1]);
return res;
}
```

};