move must be performed if there exists a line that goes through the new organizes of, another directions of b and (0,0).    If not, the move can't be performed and the focuses stay at their unique directions (xa,ya) and (xb,yb), individually.    The numeration of focuses doesn't change after certain

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Correct answer will be upvoted else downvoted.

 

 

the move must be performed if there exists a line that goes through the new organizes of, another directions of b and (0,0). 

 

If not, the move can't be performed and the focuses stay at their unique directions (xa,ya) and (xb,yb), individually. 

 

The numeration of focuses doesn't change after certain focuses are eliminated. When the focuses are eliminated, they can't be picked in any later moves. Note that you need to move the two focuses during the move, you can't leave them at their unique directions. 

 

What is the most extreme number of moves you can perform? What are these moves? 

 

In case there are various replies, you can print any of them. 

 

Input 

 

The primary line contains a solitary integer n (1≤n≤2⋅105) — the number of focuses. 

 

The I-th of the following n lines contains four integers ai,bi,ci,di (1≤ai,bi,ci,di≤109). The directions of the I-th point are xi=aibi and yi=cidi. 

 

Output 

 

In the primary line print a solitary integer c — the most extreme number of moves you can perform. 

 

Every one of the following c lines ought to contain a portrayal of a move: two integers an and b (1≤a,b≤n, a≠b) — the focuses that are eliminated during the current move. There ought to be a way of moving focuses an and b as per the assertion so that there's a line that goes through the new arranges of a, the new organizes of b and (0,0). No eliminated point can be picked in a later move.

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Developing computer interface
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education