Given the ball's position and 11 attackers plus 11 defenders, decide whether any attacker is in an offside position per two coordinate conditions.
Easy3ImplementationGeometryBrute forceSortingInterviewNo attempts yetTime limit2sMemory limit512 MBOf the seventeen laws of soccer, Law 11 on offside is probably the most argued about. Offside has two parts: the offside position, and the state of play that turns that position into an offense. To judge offside offenses consistently, and to quiet the parents who are sure they know the rules better than the referee but will not referee themselves, your team has been asked to write the analysis algorithm for Offside Enforcement Technology (OET). This phase covers the offside position only.
A player is in an offside position when both of the following hold.
Treat the ball and every player as a single point. The field is 100m long and 80m wide, the point (0,0) is the center of the halfway line, and the opponents' goal line runs from (50,−40) to (50,40), so a larger x is closer to that goal line. Decide whether at least one of the eleven attacking players is in an offside position.

The input is a single test case of exactly 23 lines. Each line holds two integers x and y (−50≤x≤50, −40≤y≤40), the position of the ball or of a player on the field in meters. The first line is the ball. The next 11 lines are the eleven attacking players, and the last 11 lines are the eleven defending players. No two players share a position.
Print 1 if at least one attacking player is in an offside position, and 0 otherwise.