Skip to content
UPEEC

Resistor Power Rating

Easy#engineering#electronics· solved by 0 · time limit 2.0 s

A resistor RR with voltage VV across it dissipates P=V2RP = \frac{V^2}{R} watts. Engineers pick a rating at least twice PP. Print PP (3 decimals) and the smallest standard rating from 0.125, 0.25, 0.5, 1, 2, 5, 10 W that is ≥2P\ge 2P (as 0.25W, 1W, …), or Too much if none is enough.

Input

VV and RR.

Output

PP and the rating.

Constraints

0<V≤10000 < V \le 1000, 1≤R≤1071 \le R \le 10^7

Sample 1

Input

5 220

Output

0.114 0.25W

Sample 2

Input

12 10

Output

14.400 Too much

Sign in or join free to run and submit your solution.