public class Solution {
public int[] constructRectangle(int area) {
int[] ans = {0,0};
int start = (int) Math.sqrt(area) ;
while (area % start != 0){
start--;
}
ans[0] = (area / start > start) ? area / start : start;
ans[1] = (area / start > start) ? start : area / start;
return ans;
}
}