Under construction

Still being built. Things may change

Rings

Interview

Time limit1sMemory limit128 MB

Summary
Given radii of N touching rings, compute how many rotations each ring after the first makes as a reduced fraction when the first ring completes one rotation.
Level

Easy3 of 10

Topics
Math, Number theory, Implementation
Solved
No attempts yet

Problem

N rings are placed on the floor in a row so that neighboring rings touch each other.

When the first ring starts rotating, every other ring rotates with it. Some rings may rotate faster than the first ring, and some may rotate more slowly.

Given the radius of each ring in order, determine how many rotations each other ring makes when the first ring rotates exactly once. Print only the number of rotations, not the direction of rotation.

Input

The first line contains the number of rings N (3 <= N <= 100).

The second line contains N natural numbers, the radii of the rings in the order they are placed. Each radius is between 1 and 1000, inclusive.

Output

Print N-1 lines. For each ring except the first, print how many rotations that ring makes when the first ring rotates once.

Write each value as a reduced fraction A/B.

Examples3

  1. Example 1

    Input
    3
    8 4 2
    
    Expected output
    2/1
    4/1
    
  2. Example 2

    Input
    4
    12 3 8 4
    
    Expected output
    4/1
    3/2
    3/1
    
  3. Example 3

    Input
    4
    300 1 1 300
    
    Expected output
    300/1
    300/1
    1/1