Black Hole
题号:NC239622
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
Special Judge, 64bit IO Format: %lld

题目描述

See Problem N for PDF statements.
Equestria is a place full of friendship, magic, and mysteries. Thus, when Twilight Sparkle finds non-spherical black holes in the sky, she is curious rather than surprised.

Twilight Sparkle finds that each of the black holes is a convex regular polyhedron with n faces (a convex polyhedron whose n faces are identical regular polygons), and the length of its edges is a.

Every day the black hole will shrink exactly once. If a black hole shrinks, it will become the convex hull of n geometry centers of the original black hole's n faces. And whenever the black hole isn't a regular polyhedron, it will disappear forever.

Twilight Sparkle has made T records for the black holes she has observed. Each of the records can be described as a tuple (n,a,k), indicating that a convex regular polyhedron black hole with edges of length a and n faces initially has shrunk k times. However, naughty Rainbow Dash replaced some of the records with impossible ones. Can you find out the impossible records and calculate the final n' and a' after k times of shrinking for those possible records?

输入描述:

The first line contains an integer T , denoting the number of the records.

In the following T lines, each line describes a record and contains three integers n,a,k (, , ).

输出描述:

For each of the records, if the record is impossible, output  in a single line. Otherwise, output  followed by an integer n' and a real number a' in a single line, separated by spaces. a' is considered correct if the relative or absolute error between yours and the standard solution is not greater than .
示例1

输入

复制
3
2 10 1
4 10 1
6 10 1

输出

复制
impossible
possible 4 3.333333333333
possible 8 7.071067811865

说明

For the first record, it's impossible to find a convex regular polyhedron with 2 faces.

For the second record, a 4-face convex regular polyhedron is a tetrahedron. After taking all its faces' geometry centers to make a convex hull, we get a smaller tetrahedron.

For the third record, a 6-face convex regular polyhedron is a cube. After taking all its faces' geometry centers to make a convex hull, we get an octahedron, a.k.a. an 8-face convex regular polyhedron.