Array Product

medium
https://codeforces.com/problemset/problem/1042/C

Input Format

Check the link

Output Format

Check the link

Constraints

Check the link

Example

Input
5
5 -2 0 1 -3
Output
2 3
1 1 2
1 2 4
1 4 5
Previous
Just Arrange The Icons
Next
Enlarge Gcd

Related Questions