We need to solve the problem: given positive integers a, b, c up to 1e9, determine if sqrt(a) + sqrt(b) < sqrt(c). Since sqrt returns real numbers, we cannot directly compare due to floating point precision issues. Instead we can square both sides after rearranging to avoid negative. However careful: sqrt(a) + sqrt(b) < sqrt(c) is equivalent to (sqrt(a) + sqrt(b))^2 < c, provided both sides are non-negative, which they are. But squaring an inequality is not always valid if the inequality sign could be reversed? Actually if both sides are non-negative, squaring preserves the inequality: For non-negative X, Y, X < Y implies X^2 < Y^2. Conversely, if X^2 < Y^2 and X, Y >=0, then X < Y. So we can square: sqrt(a) + sqrt(b) < sqrt(c) iff (sqrt(a) + sqrt(b))^2 < c, i.e., a + b + 2sqrt(ab) < c. But then we have sqrt again. However we can rearrange: 2sqrt(ab) < c - a - b. Now we need to be careful with signs. So we can proceed: Check if c - a - b > 0 and (2*sqrt(ab))^2 < (c - a - b)^2, i.e., 4ab < (c - a - b)^2. But this condition is only valid when c - a - b > 0. If c - a - b <= 0, then the inequality sqrt(a) + sqrt(b) < sqrt(c) cannot hold? Actually if c - a - b <= 0, then a + b >= c, but sqrt(a)+sqrt(b) vs sqrt(c)? Consider a=1,b=1,c=2: sqrt1+sqrt1=2, sqrt2~1.414, so 2<1.414 false. So likely it's false, but we need to be sure: If c - a - b <= 0, the left side of 2 sqrt(ab) < negative number? Since 2 sqrt(ab) >= 0, cannot be less than a negative or zero? If c - a - b = 0, then we need 2 sqrt(ab) < 0 which is false (unless ab=0, but a,b>=1 so >0). So indeed if c - a - b <= 0, the inequality cannot hold. So we can define:
If c - a - b < 0: answer No.
If c - a - b = 0: answer No (since sqrt(a)+sqrt(b) >= sqrt(a+b)? Actually need to check: a+b = c, then compare sqrt(a)+sqrt(b) vs sqrt(a+b). By squaring: (sqrt(a)+sqrt(b))^2 = a+b+2sqrt(ab) > a+b (since sqrt(ab)>0). So sqrt(a)+sqrt(b) > sqrt(a+b) = sqrt(c). So >, not <. So No.
If c - a - b > 0: then we need to check if 4ab < (c - a - b)^2. If yes, then answer Yes, else No.
But careful: This derived condition 4ab < (c - a - b)^2 is equivalent to the original inequality? Let's double-check the logic.
Original: sqrt(a)+sqrt(b) < sqrt(c). Since all non-negative, square both sides: a + b + 2 sqrt(ab) < c. Rearr: 2 sqrt(ab) < c - a - b. Now note that both sides are real numbers. The RHS must be positive for inequality to hold because LHS >=0. So necessary condition: c - a - b > 0. If that holds, we can square again (both sides positive) to get: 4ab < (c - a - b)^2. This is indeed equivalent because squaring preserves inequality for non-negative numbers, and we have c-a-b >0. So yes: sqrt(a)+sqrt(b) < sqrt(c) <=> c - a - b > 0 AND 4ab < (c - a - b)^2.
But we must also consider the case when c - a - b >0 but after squaring we get 4ab = (c-a-b)^2? That would give equality? Let's test: Suppose 4ab = (c - a - b)^2. Then from 2 sqrt(ab) = c - a - b, we get a+b+2 sqrt(ab) = c, so sqrt(a)+sqrt(b) = sqrt(c). So not <, so should be No. So we need strict inequality: 4ab < (c - a - b)^2.
Thus algorithm: read a,b,c. Compute d = c - a - b. If d <= 0: print "No". Else if 4 * a * b < d * d: print "Yes" else print "No".
But careful with integer overflow: a,b,c up to 1e9, so ab up to 1e18, and 4ab up to 4e18, which fits within 64-bit signed integer? 2^63-1 ~9.22e18, so yes. d = c - a - b could be as high as 1e9 - 1 - 1 ≈ 1e9, and dd up to 1e18, also fits in 64-bit. However c - a - b could be negative as low as -2e9, but we only compute d*d when d>0, so fine. In Python, big ints are fine. In C++ need long long.
Edge cases: a,b,c up to 1e9, but d could be up to about 1e9; multiplication d*d may exceed 2^31, so need 64-bit.
Also note: we need to output exactly "Yes" or "No" with correct case.
Let's test with examples:
Example1: a=2,b=3,c=9 => d=9-2-3=4>0, then 4ab=423=24, d^2=16, 24<16 false => No. OK.
Example2: a=2,b=3,c=10 => d=10-2-3=5>0, 4ab=24, d^2=25, 24<25 true => Yes. OK.
Check some edge cases:
-
a=1,b=1,c=1: d= -1 <=0 => No. sqrt1+sqrt1=2 >1 => No.
-
a=1,b=1,c=4: d=4-1-1=2>0, 4ab=4, d^2=4 => 4<4 false => No. sqrt1+sqrt1=2, sqrt4=2 => equality, No.
-
a=1,b=1,c=5: d=5-2=3, d^2=9, 4ab=4<9 => Yes, sqrt1+sqrt1=2, sqrt5~2.236 => 2<2.236 true. Good.
-
a=10^9,b=10^9,c=4*10^9? Let's test large: a=b=1e9, c=4e9? But c <=1e9? Actually constraints: c <=1e9 as well? The problem says 1 <= a, b, c <= 10^9, so all up to 1e9. So c max 1e9, a,b max 1e9. So d = c - a - b can be as low as negative, but if a and b are large, c might be smaller. For d positive, we need c > a+b, but a+b could be up to 2e9, c max 1e9, so c > a+b is impossible if a,b are both large? Actually a+b could be >1e9, but c max 1e9, so the only chance for c > a+b is when a+b is less than 1e9, which is possible if a and b are small. So for many inputs, d <=0. So we need to handle negative d.
-
For a=1e9, b=1, c=1e9+2: a+b=1e9+1, c=1e9+2 => d=1>0, then 4ab=4e9, d^2=1 => false => No. sqrt(1e9)~31622.7, sqrt(1)=1, sum ~31623.7, sqrt(1e9+2)~31622.7? Actually sqrt(1e9)=31622.7766, sqrt(1e9+2) ~31622.78? Actually 31622.78^2=1e9? Let's compute: 31622.7766^2=1e9. So sqrt(1e9+2) is slightly larger. Sum ~31623.78 vs sqrt(c)~31622.78? Actually sum > sqrt(c) because sqrt(a)+sqrt(b) > sqrt(a) when b>0. So indeed not <.
Thus algorithm works.
But we must be cautious about integer overflow in 4ab if using 32-bit; use 64-bit.
Now implement.
But the problem statement mentions "All values in input are integers." So we just need to output Yes or No.
Thus solution is straightforward.
One nuance: In some problems (AtCoder ABC 228? Actually this is AtCoder typical problem: "square inequality" or "square root inequality"?). The usual solution is to compare after squaring twice as we did. But sometimes they also consider the case when c - a - b is negative but large magnitude? Already handled.
Thus answer.
Now let's think about possible pitfalls: Is there any scenario where sqrt(a)+sqrt(b) < sqrt(c) even if c - a - b <=0? Suppose c=1, a=0? but a,b >=1. So no.
What about extremely small numbers: a=1,b=2,c=3 => d=0? 3-1-2=0 => No. sqrt1+sqrt2=1+1.414=2.414, sqrt3=1.732, so false. So No.
Another case: a=1,b=2,c=4 => d=1>0, 4ab=8, d^2=1 => false => No. sqrt1+sqrt2=2.414, sqrt4=2, false.
Another case: a=1,b=2,c=5 => d=2>0, 4ab=8, d^2=4 => false => No. sqrt1+sqrt2=2.414, sqrt5=2.236, false. Actually 2.414 > 2.236, so No.
Another case: a=1,b=2,c=6 => d=3>0, 4ab=8, d^2=9 => true => Yes. sqrt1+sqrt2=2.414, sqrt6=2.449, true.
Thus works.
Edge case: a or b could be perfect squares? doesn't matter.
Now implementation details:
We'll read three integers a,b,c.
Compute d = c - a - b.
If d < 0: print "No". Actually d <= 0? Check d = 0: No.
Else (d > 0): if 4ab < d*d: print "Yes" else print "No".
But careful: In Python we can just compute.
In C++: long long a,b,c; cin >> a >> b >> c; long long d = c - a - b; if(d <= 0) cout << "No"; else if (4LL * a * b < d * d) cout << "Yes"; else cout << "No";
But need to consider overflow in 4ab: a and b up to 1e9, product up to 1e18, multiplied by 4 = 4e18 which fits in signed 64-bit (max 9.22e18). So safe. d up to 1e9, squared 1e18, safe.
But be careful: if d is large (close to 1e9) then d*d is up to 1e18, same.
Thus solution.
But note: There might be another approach: Compare (sqrt(a)+sqrt(b))^2 and c, but that includes sqrt term. However the squared condition yields a+b+2*sqrt(ab) < c => (c - a - b) > 2 sqrt(ab). Since both sides positive we square. Equivalent to above.
Now check: Is there any scenario where c - a - b > 0 but after squaring the inequality holds but original does not? That can't happen because squaring is reversible when both sides non-negative. But we must ensure that c - a - b > 0 and 4ab < (c - a - b)^2 indeed implies original. The steps are:
- Starting from c - a - b > 0 and 4ab < (c - a - b)^2.
- Then sqrt(4ab) = 2 sqrt(ab) < c - a - b (since both sides >0, squaring preserves inequality). Actually careful: For positive numbers, x^2 < y^2 implies x < y. So from 4ab < (c-a-b)^2, we have sqrt(4ab) < c-a-b? But sqrt(4ab) = 2 sqrt(ab). So 2 sqrt(ab) < c - a - b. Then add a+b both sides: a+b+2 sqrt(ab) < c. Then since sqrt(a)+sqrt(b) is non-negative and (sqrt(a)+sqrt(b))^2 = a+b+2 sqrt(ab), we have (sqrt(a)+sqrt(b))^2 < c. Taking sqrt on both sides (both non-negative) yields sqrt(a)+sqrt(b) < sqrt(c). Because for non-negative X, Y, X^2 < Y^2 implies X < Y. So yes.
Thus condition is both necessary and sufficient.
Thus answer.
Now I'll produce solution.
But also note: Some solutions check if (sqrt(a)+sqrt(b))^2 < c and then compare with epsilon, but that can cause floating point errors for large numbers. Better use integer arithmetic.
Now, what about Python? We'll use int.
Implementation:
def solve():
import sys
a,b,c = map(int, sys.stdin.read().split())
d = c - a - b
if d > 0 and 4ab < d*d:
print("Yes")
else:
print("No")
Edge: if d <= 0, else false.
Testing: Example2: 2 3 10 => d=5>0, 423=24 < 25 => Yes.
Example1: 2 3 9 => d=4>0, 24<16 false => No.
Works.
Thus final answer. ```python
import sys
def main() -> None:
a, b, c = map(int, sys.stdin.read().split())
d = c - a - b
if d > 0 and 4 * a * b < d * d:
print("Yes")
else:
print("No")
if name == "main":
main()