Problem: Levko loves tables that consist of n rows and n columns very much. He especially loves beautiful tables. A table is beautiful to Levko if the sum of elements in each row and column of the table equals k.

Unfortunately, he doesn't know any such table. Your task is to help him to find at least one of them. 

Input

The single line contains two integers, n and k (1 ≤ n ≤ 100, 1 ≤ k ≤ 1000).

Output

Print any beautiful table. Levko doesn't like too big numbers, so all elements of the table mustn't exceed 1000 in their absolute value.

If there are multiple suitable tables, you are allowed to print any of them.

Examples

Input

2 4


Output

1 3
3 1


Input

4 7


Output

2 1 0 4
4 0 2 1
1 3 3 0
0 3 2 2

Note

In the first sample the sum in the first row is 1 + 3 = 4, in the second row — 3 + 1 = 4, in the first column — 1 + 3 = 4 and in the second column — 3 + 1 = 4. There are other beautiful tables for this sample.

In the second sample the sum of elements in each row and each column equals 7. Besides, there are other tables that meet the statement requirements.

Solution (in JAVA):

Solution:
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.net.InetAddress;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Scanner;
import java.util.StringTokenizer;
import javax.swing.tree.TreeNode;


public class codeforces {
  

    public static int Binary(int x,int array[]){
        int min=0;
        int max=array.length-1;
        int mid=0;
        while(min<max){
            mid=(max+min)/2;
            if (array[mid]==x)return mid;
            if (x>array[mid])min=mid+1;
            if (x<array[mid])max=mid-1;
         
        
        
        }
    
    
    
        
    
    return 0;}
    
    
    
 
    
    
    public static void main(String[] args) throws IOException {
        Reader.init(System.in);
        PrintWriter pw=new PrintWriter(System.out);
        StringBuilder sb;
        int n=Reader.nextInt(),sum=Reader.nextInt();
        
       int ar[][]=new int[n][n];
        for (int i = 0; i < n; i++) {
            ar[i][i]=sum;
        }
          for (int i = 0; i < n; i++) {
              for (int j = 0; j < n; j++) 
                  pw.print(ar[i][j]+" ");
              pw.println();
        }

            
        
       
          
            
        pw.close();
        
        
        

              

       
       
               
        
       
             
        
       
    }
    
   
    
    
    
    
    
    
    
    
    
    
    
    }
    
 class Reader {
 
        static BufferedReader reader;
        static StringTokenizer tokenizer;
 
        public static int pars(String x) {
            int num = 0;
            int i = 0;
            if (x.charAt(0) == '-') {
                i = 1;
            }
            for (; i < x.length(); i++) {
                num = num * 10 + (x.charAt(i) - '0');
            }
 
            if (x.charAt(0) == '-') {
                return -num;
            }
 
            return num;
        }
 
        static void init(InputStream input) {
            reader = new BufferedReader(
                    new InputStreamReader(input));
            tokenizer = new StringTokenizer("");
        }
 
        static void init(FileReader input) {
            reader = new BufferedReader(input);
            tokenizer = new StringTokenizer("");
        }
 
        static String next() throws IOException {
            while (!tokenizer.hasMoreTokens()) {
                tokenizer = new StringTokenizer(
                        reader.readLine());
            }
            return tokenizer.nextToken();
        }
 
        static int nextInt() throws IOException {
            return pars(next());
        }
 
        static long nextLong() throws IOException {
            return Long.parseLong(next());
        }
 
        static double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }
    }