class UsoMath {
 public static void main(String[] args) {
    double x = -1;
    double y = Math.sqrt(x);
    System.out.println(y);
    System.out.println(Double.isNaN(y));
 }

}