Hide

Problem I
Squirt Gun Trajectory

A popular game at Wally’s Water Park is the Squirt Gun Challenge. In this game, players must shoot a target with a squirt gun. The target is a small hole in a wall at the exact same height as the nozzle of the squirt gun. For every second the water stream from the squirt gun hits the target the player earns a point. The player with the most points wins! The squirt guns are mounted on sliding platforms that can move back and forth along a straight line. A player can control a squirt gun by moving the platform forwards or backwards between the two ends of the track it’s on or by tilting the squirt gun up or down. Being the careful observer you are, you notice that one of the squirt guns has a sticky spot, a spot where the friction makes it possible to get it stuck at a certain angle θ. You realize that you can use this to your advantage. If you use that squirt gun and get it stuck at that angle, then all you have to do is move the platform until you hit the target at which point you’ll be basically guaranteed to win!

While the game operator is distracted, you take the opportunity to measure the angle the squirt gun gets stuck at (relative to the ground) θ, the speed of the water coming out of the squirt gun v, and the distances from the start and end of the track to the target dmin and dmax respectively.

You also think back to your physics class and remember the following:

  • The horizontal velocity vx of any drop of water will be vcosθ as it’s leaving the squirt gun

  • The vertical velocity vy of any drop of water will be vsinθ as it’s leaving the squirt gun

  • t seconds after a drop of water has left the squirt gun it will have decelerated by 9.81t m/s in the vertical direction (i.e. its vertical velocity will have decreased by that amount) due to gravity

  • During the entire flight of each drop, the horizontal velocity will remain constant

  • It will take the same amount of time for any drop to reach its maximum height as it will to return to its starting height

  • The height of a drop (relative to its starting height) t seconds after leaving the squirt gun will be vyt+12(9.81)t2

However, your insatiable thirst for victory has led you to miss a small detail. It might not be possible to hit the target with the squirt gun stuck at that angle!

Input

The input consists of a single line containing four integers θ, v, dmin, and dmax (0θ90, 1v100, 1dmin<dmax1000) where θ, v, dmin, and dmax are the angle the squirt gun gets stuck at in degrees, the speed of the water coming out of the squirt gun in m/s, and the minimum and maximum distances you can position the platform from the target in meters respectively.

Output

Output “POSSIBLE” if it is possible to hit the target using your strategy or “IMPOSSIBLE” otherwise.

Sample Input 1 Sample Output 1
30 10 6 10
POSSIBLE
Sample Input 2 Sample Output 2
30 10 1 7
IMPOSSIBLE
Hide

Please log in to submit a solution to this problem

Log in