month of remote learning, Nastya became ill of remaining at residence, so she chose to get back to her old neighborhood. To make her outing really engaging, one of Nastya's companion introduced her an integer exhibit aa.

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. 

 

 

third month of remote learning, Nastya became ill of remaining at residence, so she chose to get back to her old neighborhood. To make her outing really engaging, one of Nastya's companion introduced her an integer exhibit aa. 

 

A few hours subsequent to beginning her excursion home Nastya recollected about the present. To engage herself she chose to check, are there four unique records x,y,z,wx,y,z,w to such an extent that ax+ay=az+awax+ay=az+aw. 

 

Her train has as of now showed up the objective, however she actually hasn't found the appropriate response. Would you be able to assist her with unwinding the secret? 

 

Input 

 

The main line contains the single integer nn (4≤n≤2000004≤n≤200000) — the size of the exhibit. 

 

The subsequent line contains nn integers a1,a2,… ,ana1,a2,… ,an (1≤ai≤2.5⋅1061≤ai≤2.5⋅106). 

 

Output 

 

Print "YES" in case there are such four files, and "NO" in any case. 

 

In the event that such lists exist, print these lists xx, yy, zz and ww (1≤x,y,z,w≤n1≤x,y,z,w≤n). 

 

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

Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Random Class and its operations
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