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 CPP):

Solution:
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
deque<int> deq;
const long double EPS = 0.000000001;
const long long INF64 = 1000000000000000000;
const int INF32 = 2000000000;
bool iss_pt_in_triangle(pair<int, int> a, pair<int, int> b, pair<int, int> c,
                        pair<int, int> point) {
  int x1 = a.first, x2 = b.first, x3 = c.first, x0 = point.first;
  int y1 = a.second, y2 = b.second, y3 = c.second, y0 = point.second;
  int aa = (x1 - x0) * (y2 - y1) - (x2 - x1) * (y1 - y0);
  int bb = (x2 - x0) * (y3 - y2) - (x3 - x2) * (y2 - y0);
  int cc = (x3 - x0) * (y1 - y3) - (x1 - x3) * (y3 - y0);
  if (aa == 0 || bb == 0 || cc == 0) return 1;
  if (aa >= 0 && bb >= 0 && cc >= 0) return 1;
  if (aa <= 0 && bb <= 0 && cc <= 0) return 1;
  return 0;
}
bool iss_ll(long long &__1, long long &__2) { return INF64 / __1 >= __2; }
bool equal(long double _1, long double _2) { return (abs(_1 - _2) < EPS); }
bool iss_sqr(int __1) {
  long long __2 = sqrt((long double)__1);
  return __2 * __2 == __1;
};
bool iss_prime(long long __1) {
  for (int i = 2; i * i <= __1; ++i)
    if (!(__1 % i)) return 0;
  return 1;
}
int gcd(int __1, int __2) {
  while (__1 && __2)
    if (__1 > __2)
      __1 = __1 % __2;
    else
      __2 = __2 % __1;
  return __1 + __2;
}
int lcm(int &__1, int &__2) { return __1 * __2 / (gcd(__1, __2)); }
int sq_cube(long long x) {
  if (x == 0) return 1;
  int l = 0, r = 2e6;
  while (l + 1 < r) {
    int m = (l + r) / 2;
    if (m * m * m > x)
      r = m;
    else
      l = m;
  }
  return l;
}
int arr[100100];
int dp[100100][210][2];
int md = 998244353;
signed main(signed argc, const char *argv[]) {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int cnt = 0;
  for (int i = 0; cnt < n; ++i) {
    cout << 0 << " " << i << "\n";
    ++cnt;
    if (cnt == n) break;
    if (i % 2) {
      ++cnt;
      cout << 3 << " " << i << "\n";
    }
  }
}