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 Java8 (OpenJDK 1.8.0) (judge verdict: Wrong Answer)

import java.util.*;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);		
		long a = sc.nextLong();		
		long b = sc.nextLong();
		long c = sc.nextLong();
		double x = lessThanSqrt(a)+lessThanSqrt(b);
		double y = lessThanSqrt(c);
			if(x<y)
			System.out.println("Yes");
			else
			System.out.println("No");
	}

			private static long lessThanSqrt (long a) {
				long b = longSqrt(a);
				if (b*b == a) {
					return b-1;
				} else {
					return b;
				}
			}
		
			private static long longSqrt (long a) {
				long b = (long)Math.sqrt(a);
				// 得られた値を2乗して元の値を超える場合は
				// 誤差で1大きくなっているため
				// 誤差修正のため1引いた値を返す
				if(b*b > a) {
					b--;
				}
				return b;
			}
		
		

	}