Problem: Ivan places knights on infinite chessboard. Initially there are n knights. If there is free cell which is under attack of at least 4 knights then he places new knight in this cell. Ivan repeats this until there are no such free cells. One can prove that this process is finite. One can also prove that position in the end does not depend on the order in which new knights are placed.

Ivan asked you to find initial placement of exactly n knights such that in the end there will be at least ⌊ \frac{n^{2}}{10} ⌋ knights.

Input

The only line of input contains one integer n (1 ≤ n ≤ 10^{3}) — number of knights in the initial placement.

Output

Print n lines. Each line should contain 2 numbers x_{i} and y_{i} (-10^{9} ≤ x_{i},    y_{i} ≤ 10^{9}) — coordinates of i-th knight. For all i ≠ j, (x_{i},    y_{i}) ≠ (x_{j},    y_{j}) should hold. In other words, all knights should be in different cells.

It is guaranteed that the solution exists.

Examples

Input

4


Output

1 1
3 1
1 5
4 4


Input

7


Output

2 1
1 2
4 1
5 2
2 6
5 7
6 6

Note

Let's look at second example:

<image>

Green zeroes are initial knights. Cell (3,    3) is under attack of 4 knights in cells (1,    2), (2,    1), (4,    1) and (5,    2), therefore Ivan will place a knight in this cell. Cell (4,    5) is initially attacked by only 3 knights in cells (2,    6), (5,    7) and (6,    6). But new knight in cell (3,    3) also attacks cell (4,    5), now it is attacked by 4 knights and Ivan will place another knight in this cell. There are no more free cells which are attacked by 4 or more knights, so the process stops. There are 9 knights in the end, which is not less than ⌊ \frac{7^{2}}{10} ⌋ = 4.

Solution (in JAVA):

Solution:
import java.io.*;
import java.util.*;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.function.Consumer;

public class F {
    public static void main(String[] args) throws IOException {
        try (Input input = new StandardInput(); PrintWriter writer = new PrintWriter(System.out)) {
            class Cell {
                private final int r, c;

                Cell(int r, int c) {
                    this.r = r;
                    this.c = c;
                }

                @Override
                public boolean equals(Object o) {
                    if (this == o) return true;
                    if (o == null || getClass() != o.getClass()) return false;
                    Cell cell = (Cell) o;
                    return r == cell.r &&
                            c == cell.c;
                }

                @Override
                public int hashCode() {
                    return Objects.hash(r, c);
                }

                @Override
                public String toString() {
                    return r + " " + c;
                }
            }
            class MaskDecoder {
                private final int maxR, maxC;

                private MaskDecoder(int maxR, int maxC) {
                    this.maxR = maxR;
                    this.maxC = maxC;
                }

                private void decode(int mask, Consumer<Cell> cellConsumer) {
                    for (int r = 0; r < maxR; r++) {
                        for (int c = 0; c < maxC; c++) {
                            if (mask % 2 == 1) {
                                Cell cell = new Cell(r, c);
                                cellConsumer.accept(cell);
                            }
                            mask /= 2;
                        }
                    }
                }
            }
            class MaskIterator {
                private final int r, c, mask;
                private int fullDimension;

                MaskIterator(int r, int c, int mask) {
                    this.r = r;
                    this.c = c;
                    this.mask = mask;
                }

                void iterate(int n, Consumer<Cell> cellConsumer) {
                    fullDimension = 0;
                    AtomicInteger iterations = new AtomicInteger(n);
                    MaskDecoder maskDecoder = new MaskDecoder(r, c);
                    for (int i = 0; iterations.get() > 0; i++) {
                        int dr = r * i;
                        maskDecoder.decode(mask, cell -> {
                            if (iterations.get() != 0) {
                                iterations.decrementAndGet();
                                cellConsumer.accept(new Cell(cell.r + dr, cell.c));
                            }
                        });
                    }
                }
            }
            class PatternFinder {
                void findAndPrint() {
                    for (int r = 1; ; r++) {
                        for (int c = 1; c <= r; c++) {
                            System.out.printf("r = %d, c = %d\n", r, c);
                            for (int mask = 1; mask < 1 << (r * c); mask++) {
                                if (mask % 10000 == 0) {
                                    System.out.println("mask = " + mask);
                                }
                                if (goodMask(mask, r, c)) {
                                    System.out.println(" good mask = " + mask);
                                    return;
                                }
                            }
                        }
                    }
                }

                boolean goodMask(int mask, int maxR, int maxC) {
                    Map<Cell, Integer> hitCount = new HashMap<>();
                    Set<Cell> hitSet = new HashSet<>();
                    AtomicBoolean good = new AtomicBoolean(true);
                    Queue<Cell> q = new LinkedList<>();
                    MaskIterator maskIterator = new MaskIterator(maxR, maxC, mask);
                    AtomicInteger processed = new AtomicInteger(0);
                    maskIterator.iterate(1000, cell -> {
                        if (!hitSet.contains(cell)) {
                            hitSet.add(cell);
                            q.add(cell);
                            while (!q.isEmpty()) {
                                cell = q.poll();
                                int[] dr = {-1, -1, -2, -2, 1, 1, 2, 2};
                                int[] dc = {-2, 2, -1, 1, -2, 2, -1, 1};
                                for (int k = 0; k < 8; k++) {
                                    Cell hitCell = new Cell(cell.r + dr[k], cell.c + dc[k]);
                                    int hc = hitCount.getOrDefault(hitCell, 0) + 1;
                                    hitCount.put(hitCell, hc);
                                    if (hc == 4 && !hitSet.contains(hitCell)) {
                                        q.add(hitCell);
                                        hitSet.add(hitCell);
                                    }
                                }
                            }
                        }
                        int n = processed.incrementAndGet();
                        if (hitSet.size() < n * n / 10) {
                            good.set(false);
                        }
                    });
                    return good.get();
                }
            }
            //new PatternFinder().findAndPrint();
            new MaskIterator(4, 3, 1365).iterate(input.nextInt(), writer::println);
        }
    }

    interface Input extends Closeable {
        String next() throws IOException;

        default int nextInt() throws IOException {
            return Integer.parseInt(next());
        }

        default long nextLong() throws IOException {
            return Long.parseLong(next());
        }
    }

    private static class StandardInput implements Input {
        private final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

        private StringTokenizer stringTokenizer;

        @Override
        public void close() throws IOException {
            reader.close();
        }

        @Override
        public String next() throws IOException {
            if (stringTokenizer == null || !stringTokenizer.hasMoreTokens()) {
                stringTokenizer = new StringTokenizer(reader.readLine());
            }
            return stringTokenizer.nextToken();
        }
    }
}