ID προβλήματος: zigcantor
Τίτλος: Ο Cantor τρελάθηκε
Βαθμός Δυσκολίας: 4
Ημερομηνία Εισαγωγής: 2000-06-05
Σχόλια:

Ο Cantor τρελάθηκε

We arrange natural numbers starting from one (1) in a 2-D table like the following schema:


     1   2   3   4   5   ...
   +---+---+---+---+---+---
 1 | 1 | 3 | 4 | 10| 11|  
   +---+---+---+---+---+---
 2 | 2 | 5 | 9 | 12|   |   
   +---+---+---+---+---+--- ...
 3 | 6 | 8 | 13|   |   |   
   +---+---+---+---+---+---
 4 | 7 | 14|   |   |   |   
   +---+---+---+---+---+---
 5 | 15|   |   |   |   |  
             ...

In the standard input we have a series of numbers (in the range between 1 and 2000000000), one number in each line. The series end with EOF. In the output we should have the appropriate coordinates of the input numbers as in the following example:
Παραδείγματα εισόδου/εξόδου
ΕίσοδοςΈξοδος
1
3
5
TERM 1 IS 1/1
TERM 3 IS 2/1
TERM 5 IS 2/2