I've read [How do I delete the first n lines of an ascii file using shell commands?](https://unix.stackexchange.com/questions/37790/how-do-i-delete-the-first-n-lines-of-an-ascii-file-using-shell-commands), it is helpful. However I've a file something as below (please consider 2 columns as 2 different files):

```
1 4
1 4
1 4
1 4
1 4
3 5
3 5
3 5
3 5
3 5
7 5
7 5
7 5
7 5
7 5

```

I need to delete line 2-5 then 7-10 and so on (Valid outputs are 1, 3, 7 and 4, 5, 5).

I know number of lines for which pattern (number) repeats. However I don't know if everytime it would follow same pattern for e.g. here its 1, 3, 7 next file can have 4, 6, 1 or 4, 5, 5 so I need to make it number of lines based than grepping the values.

Can anyone give me a pointer how would I delete lines repetitively?