Problem:
Score : 300 points

Problem Statement

Does \sqrt{a} + \sqrt{b} < \sqrt{c} hold?

Constraints

1 \leq a, b, c \leq 10^9

All values in input are integers.

Input

Input is given from Standard Input in the following format:

a \ b \ c

Output

If \sqrt{a} + \sqrt{b} < \sqrt{c}, print Yes; otherwise, print No.

Sample Input 1

2 3 9

Sample Output 1

No

\sqrt{2} + \sqrt{3} < \sqrt{9} does not hold.

Sample Input 2

2 3 10

Sample Output 2

Yes

\sqrt{2} + \sqrt{3} < \sqrt{10} holds.

Solution in Kotlin (1.0.0) (judge verdict: Wrong Answer)

import java.math.BigDecimal

import java.math.MathContext

fun main(args: Array<String>) = panasonic2020c()

fun panasonic2020c() {
    val (a, b, c) = readLine()!!.split(' ').map { BigDecimal(it) }

    val answer =
        if (sqrt(a, 2)!! + sqrt(b, 2)!! < sqrt(c, 2)!!) "Yes" else "No"

    println(answer)
}

fun sqrt(a: BigDecimal, scale: Int): BigDecimal? {
    var x = BigDecimal(Math.sqrt(a.toDouble()), MathContext.DECIMAL64)
    if (scale < 17) {
        x = x.setScale(scale, BigDecimal.ROUND_HALF_EVEN)
        return x
    }
    val b2 = BigDecimal(2)
    var tempScale = 16
    while (tempScale < scale) {
        x = x.subtract(
            x.multiply(x).subtract(a).divide(
                x.multiply(b2), scale, BigDecimal.ROUND_HALF_EVEN
            )
        )
        tempScale *= 2
    }
    return x
}