https://programmers.co.kr/learn/courses/30/lessons/12934
function solution(n) {
let answer = 0;
const squareRoot = Math.sqrt(n);
const isInteger = Number.isInteger(squareRoot);
if (isInteger) {
answer = Math.pow(squareRoot + 1, 2);
} else {
answer = -1;
}
return answer;
}