chris-angle
Source: hackerearth
Difficulty: UNKNOWN_DIFFICULTY

Chris always struggle in converting angles from degree to radian or vice-verse. You being his best friend whom he trusts so much, decided to help him out. Sam has T angles you need to convert them in radian and represent them in fraction(i.e P/Q) and simplest form.
[Note]: be careful with sign convention here π=$.

Input

The first line contains a single integer(T), the number of test cases.
Then next T lines follow, each having integral value of angle(denoted by A).  

Output

You need to print the equivalent value of degree in radian.
Sam wants the answer in fractional form and the symbol pi to be denoted by '$' sign(without the quotes).

Constraints
1 ≤ T ≤ 1000
1 ≤ A ≤ 10^9

SAMPLE INPUT
5
90
180
87
720
4

SAMPLE OUTPUT
$/2
$
29$/60
0$
$/45