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

faces (a convex polyhedron whose

faces are identical regular polygons), and the length of its edges is

.
Every day the black hole will shrink
exactly once. If a black hole shrinks, it will become the convex hull of

geometry centers of the original black hole's

faces. And whenever the black hole isn't a regular polyhedron, it will disappear forever.
Twilight Sparkle has made

records for the black holes she has observed. Each of the records can be described as a tuple
)
, indicating that a convex regular polyhedron black hole with edges of length

and

faces initially has shrunk

times. However, naughty Rainbow Dash replaced some of the records with impossible ones. Can you find out the impossible records and calculate the final

and

after

times of shrinking for those possible records?