Didn't like quadrants in B005 or trigonometry in B006? Good news! This task combines both!
We only consider the trigonometric ratios $ \sin $, $ \cos $ and $ \tan $ in this task.
It is known that:
- In Qudrant I, $ \sin{\theta} \gt 0 $, $ \cos{\theta} \gt 0 $ and $ \tan{\theta} \gt 0 $.
- In Quadrant II, $ \sin{\theta} \gt 0 $, $ \cos{\theta} \lt 0 $ and $ \tan{\theta} \lt 0 $.
- In Quadrant III, $ \sin{\theta} \lt 0 $, $ \cos{\theta} \lt 0 $ and $ \tan{\theta} \gt 0 $.
- In Quadrant IV, $ \sin{\theta} \lt 0 $, $ \cos{\theta} \gt 0 $ and $ \tan{\theta} \lt 0 $.
Given the sign of any two trigonometric ratios in one of the quadrants, determine the sign of the remaining trigonometric ratio in the same quadrant.
Input
The two lines of input are both in the form f s
,
where f
is either sin
, cos
or tan
,
and s
is either +
or -
.
f
and s
denote the trignometric ratio and its sign respectively.
It is guaranteed that the two trigonometric ratios are distinct.
Output
Output +
or -
, indicating the sign of the remaining trigonometric ratio.
Sample Test Cases
Input | Output | |
---|---|---|
sin - tan + |
- |
Scoring: Per Case
Authored by s16f22
Appeared in Test Contest