The output consists of n lines for the n cases. Each line has two
integers, separated by a space (let them be x and y), such that:
where is the operation indicated by a. The fraction
must be in the most reduced form. For example, for the
fraction
, its most reduced form is
; for
, it would be
. If the resulting fraction
is negative, put the negative sign in x. You may assume that there
is no division by zero, and all integers are between -2,000,000,000 and
2,000,000,000.