Walk on Matrix

Bob is playing a game named “Walk on Matrix”.

In this game, player is given an $n \times m$ matrix $A=(a_{i,j})$, i.e. the element in the $i$-th row in the $j$-th column is $a_{i,j}$. Initially, player is located at position $(1,1)$ with score $a_{1,1}$.

To reach the goal, position $(n,m)$, player can move right or down, i.e. move from $(x,y)$ to $(x,y+1)$ or $(x+1,y)$, as long as player is still on the matrix.

However, each move changes player’s score to the bitwise AND of the current score and the value at the position he moves to.

Bob can’t wait to find out the maximum score he can get using the tool he recently learnt  — dynamic programming. Here is his algorithm for this problem.

However, he suddenly realize that the algorithm above fails to output the maximum score for some matrix $A$. Thus, for any given non-negative integer $k$, he wants to find out an $n \times m$ matrix $A=(a_{i,j})$ such that

  • $1 \le n,m \le 500$ (as Bob hates large matrix);
  • $0 \le a_{i,j} \le 3 \cdot 10^5$ for all $1 \le i\le n,1 \le j\le m$ (as Bob hates large numbers);
  • the difference between the maximum score he can get and the output of his algorithm is exactly $k$.

It can be shown that for any given integer $k$ such that $0 \le k \le 10^5$, there exists a matrix satisfying the above constraints.

Please help him with it!

Input

The only line of the input contains one single integer $k$ ($0 \le k \le 10^5$).

Output

Output two integers $n$, $m$ ($1 \le n,m \le 500$) in the first line, representing the size of the matrix.

Then output $n$ lines with $m$ integers in each line, $a_{i,j}$ in the $(i+1)$-th row, $j$-th column.

Examples

input

0

output

1 1
300000

input

1

output

3 4
7 3 3 1
4 8 3 6
7 7 7 3

Note

In the first example, the maximum score Bob can achieve is $300000$, while the output of his algorithm is $300000$.

In the second example, the maximum score Bob can achieve is $7\&3\&3\&3\&7\&3=3$, while the output of his algorithm is $2$.

Solution:

#include <bits/stdc++.h>
using namespace std;
#define rep(i,a,n) for (int i=a;i<n;i++)
#define per(i,a,n) for (int i=n-1;i>=a;i--)
#define pb push_back
#define mp make_pair
#define all(x) (x).begin(),(x).end()
#define fi first
#define se second
#define SZ(x) ((int)(x).size())
typedef vector<int> VI;
typedef long long ll;
typedef pair<int,int> PII;
typedef double db;
mt19937 mrand(random_device{}());
const ll mod=1000000007;
int rnd(int x) { return mrand() % x;}
ll powmod(ll a,ll b) {ll res=1;a%=mod; assert(b>=0); for(;b;b>>=1){if(b&1)res=res*a%mod;a=a*a%mod;}return res;}
ll gcd(ll a,ll b) { return b?gcd(b,a%b):a;}
// head

const int N=510;
int k,a[N][N],dp[N][N],n=10;
int main() {
scanf("%d",&k);
//for (int i=0;i<=300000;i++) if ((i&k)==k&&__builtin_popcount(k^i)==1) cand.pb(i);
	for (int i=1;i<=n;i++) for (int j=1;j<=n;j++) {
		//if (i+j<=3) a[i][j]=(1<<17)-1;
		//else a[i][j]=(1<<17)-1-k;
		a[i][j]=(1<<18)-1;
	}
	a[1][3]=(1<<18)-1-k;
	a[3][1]=(1<<18)-1-k;
	a[2][2]=k;
	a[n][n]=k;
	dp[0][1]=a[1][1];
	for (int i=1;i<=n;i++) for (int j=1;j<=n;j++) {
		dp[i][j]=max(dp[i-1][j]&a[i][j],dp[i][j-1]&a[i][j]);
	}
	printf("%d %d\n",n,n);
	rep(i,1,n+1) rep(j,1,n+1) printf("%d%c",a[i][j]," \n"[j==n]);
//	printf("%d\n",dp[n][n]);
}