ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules

USU Championship 2003

About     Problems     Submit solution     Judge status     Standings
Contest is over

A. Mirror

Time limit: 1.0 second
Memory limit: 64 MB
Ri-i-i-i-ing… Ri-i-i-i-ing…
— W-what the hell!!!??? — cursed major Pronin, hardly opening his eyes and looking at the watch on the bed-side table. — Who wants me on Sunday at 5 a.m.?
Major took his pistol, pointed it at the telephone and squinted his left eye. The image blurred and he couldn’t aim. The yesterday party told on him.
Ri-i-i-i-ing… Ri-i-i-i-ing… — crackled the telephone-set busily.
Had overcome a great temptation, Pronin put his pistol away, reached the telephone and and took a receiver. “Whoever it is, he won’t be alive by the next morning,” — he thought at that minute. Major imagined the caller lying in the mass of blood and himself, standing next to the corpse with the fuming pistol with a smile on his face.
— Major Pronin? — he heard from the receiver.
Had listened a familiar voice, major stood at attention.
— Yes sir! Mister general, sir!
— You have an assignment. A car is waiting for you near your doorway. See you in the office in 20 minutes.
The line disconnected.
Pronin entered the general’s office after 19 minutes and 50 seconds after the call.
— A very important investigation, — said the general after a short salutation. — Possibly, a murder. Yesterday’s night a famous banker Kozlov A. E. knocked down a pedestrian. It seemed an ordinary case but the victim appeared to be his opponent at the legal process that our… “client” has won. The detained suspect claims that he didn’t notice the pedestrian in the rear-view mirror while driving out of his garage. He lays stress that it was an accident. We’d better verify it. Here are the documents. You are to give a report to me personally immediately after your investigation ends. As you know our Kozlov A. E. is a mayor contender. There mustn’t be a mistake!
— Yes, sir! — bawled the major. — May I go?
— Go!
Pronin looked through the on-site review protocol. Meticulous officers of the criminal investigation department worked out a very exact description of the situation. In particular, he found the metering results of the car mirror and the location of the body.
— Stop! — said the major. I can determine with the help of this data if our banker lies or not saying that he didn’t see the pedestrian!
He took all the data and left to the analytical department to his acquainted programmer. He reached the door and…
Knock, knock, Contestant!
Major has you.

Input

There are 8 real numbers within 6 digits after a decimal point, separated with one or several spaces and/or linefeeds — (−1000 ≤ x1, y1, x2, y2, xm1, ym1, xm2, ym2 ≤ 1000). Those are the banker’s eyes coordinates (major calculated them by the deductive method according to the situation description worked out by the criminal investigation department officers), the victim body at the moment of blow (calculated the same way) and both ends of the mirror coordinates, respectively. It’s guaranteed that that the points (x1, y1) and (x2, y2) don’t lie on one straight line, passing through the points (xm1, ym1) and (xm2, ym2). It’s also guaranteed that the points (xm1, ym1) and (xm2, ym2) are not the same.

Output

You are to output "VISIBLE" , if one can see the point (x2, y2) from the point (x1, y1) in the rear-view mirror with the ends coordinates (xm1, ym1) and (xm2, ym2), or "INVISIBLE", otherwise.

Samples

inputoutput
1 0 0 -1 0 0 1 1
VISIBLE
0.000001   0   
0   0.000001
-0.000001   -0.000001   
0.000001   0.000001
INVISIBLE

Notes

We must say that the rear-view mirror in the banker’s car is double-sided but it reflects the light as all the mirrors (the angle of incidence equals to the angle of reflection).
Problem Author: Alexander Klepinin (prepared Ivan Dashkevich)
Problem Source: Ural State University championship, October 25, 2003
To submit the solution for this problem go to the Problem set: 1265. Mirror