You are given two integers n and k.

You should create an array of n positive integers a_1, a_2, ..., a_n such that the sum (a_1 + a_2 + ... + a_n) is divisible by k and maximum element in a is minimum possible.

What is the minimum possible maximum element in a?

Input

The first line contains a single integer t (1 ≤ t ≤ 1000) — the number of test cases.

The first and only line of each test case contains two integers n and k (1 ≤ n ≤ 10^9; 1 ≤ k ≤ 10^9).

Output

For each test case, print one integer — the minimum possible maximum element in array a such that the sum (a_1 + ... + a_n) is divisible by k. 

Example

Input


4
1 5
4 3
8 8
8 17


Output


5
2
1
3

Note

In the first test case n = 1, so the array consists of one element a_1 and if we make a_1 = 5 it will be divisible by k = 5 and the minimum possible.

In the second test case, we can create array a = [1, 2, 1, 2]. The sum is divisible by k = 3 and the maximum is equal to 2.

In the third test case, we can create array a = [1, 1, 1, 1, 1, 1, 1, 1]. The sum is divisible by k = 8 and the maximum is equal to 1.
// package eround101;

import java.util.*;
import java.io.*;
import java.lang.*;
import java.util.StringTokenizer;

public class C101 {

    static HritikScanner sc = new HritikScanner();
    static  PrintWriter pw = new PrintWriter(System.out,true);
    final static int MOD = (int) (1e9 + 7);
    static int[] count = new int[1000001];
    static StringBuilder sb = new StringBuilder();

    
        public static void main(String[] args) {

        int t = sc.nextInt();
        while (t-- > 0)
            solve();
        }

     static void solve(){
//        int n = ni();      
//        int[] arrn = new int[n];
//        for(int i = 0; i < n; i++)
//        {
//            arr[i] = ni();
//        }

        int n = ni();
        int k = ni();
        int ans = 0;
        if(n < k)
        {
            ans = k/n + (k%n == 0 ? 0:1);
            pl(ans);
        }
        else if(n % k == 0)
        {
            
            pl(1);
        }
        else if(n > k)
            pl(2);
       
    }
     
     
    /////////////////////////////////////////////////////////////////////////////////
    
    static int ni() 
    {
        return sc.nextInt();
    }
    static long nl() 
    {
        return sc.nextLong();
    }
    static double nd() 
    {
        return sc.nextDouble();
    }
    
    /////////////////////////////////////////////////////////////////////////////////
    
    static void pl()
    {
        pw.println();
    }
    static void p(Object o)
    {
        pw.print(o);
    }
    static void pl(Object o)
    {
        pw.println(o);
    }
    static void psb(StringBuilder sb)
    {
        pw.print(sb);
    }
    static void pa(Object arr[])
    {
        for(Object o : arr)
            p(o);
        pl();
    }
    static void pa(int arr[])
    {
        for(int o : arr)
            p(o);
        pl();
    }
    static void pa(long arr[])
    {
        for(long o : arr)
            p(o);
        pl();
    }
    static void pa(double arr[])
    {
        for(double o : arr)
            p(o);
        pl();
    }
    static void pa( char arr[])
    {
        for(char o : arr)
            p(o);
        pl();
    }
    static void pa(List list)
    {
        for(Object o : list)
            p(o);
        pl();
    }
    static void pa(Object[][] arr) {
     
        for(int i=0;i<arr.length;++i) {
            for(Object o : arr[i])
                p(o);
            pl();
        }
    }
    static void pa(int[][] arr) {
        for(int i=0;i<arr.length;++i) {
            for(int o : arr[i])
                p(o);
            pl();
        }
    }
    static void pa(long[][] arr) {
        for(int i=0;i<arr.length;++i) {
            for(long o : arr[i])
                p(o);
            pl();
        }
    }
    static void pa(char[][] arr) {
        for(int i=0;i<arr.length;++i) {
            for(char o : arr[i])
                p(o);
            pl();
        }
    }
    static void pa(double[][] arr) {
        for(int i=0;i<arr.length;++i) {
            for(double o : arr[i])
                p(o);
            pl();
        }
    }

/////////////////////////////////////////////////////////////////////////////////


    

    static void print(Object s) {
        System.out.println(s);
    }
    
    
    
    /////////////////////////////////////////////////////////////////////////////////

    
    //-----------HritikScanner class for faster input----------//
    static class HritikScanner {

        BufferedReader br;
        StringTokenizer st;

        public HritikScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

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

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

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return str;
        }
    }
    
    

    //////////////////////////////////////////////////////////////////
    public static class Pair implements Comparable<Pair> {

        int h, w, index;

        Pair(int h, int w) {
            this.h = h;
            this.w = w;
            
        }

        public int compareTo(Pair A) {
            if (A.h == this.h) {
                return this.w - A.w;
            }
            return this.h - A.h;
        }
    }
    
     //////////////////////////////////////////////////////////////////
    
    // Function to return gcd of a and b time complexity O(log(a+b))
    static int gcd(int a, int b) 
    { 
        if (a == 0) 
            return b; 
        return gcd(b % a, a); 
    } 
    
      //////////////////////////////////////////////////////////////////

    static boolean isPrime(long n) 
    { 
        // Corner cases 
        if (n <= 1) return false; 
        if (n <= 3) return true; 
      
        // This is checked so that we can skip  
        // middle five numbers in below loop 
        if (n % 2 == 0 || n % 3 == 0) return false; 
      
        for (long i = 5; i * i <= n; i = i + 6) 
            if (n % i == 0 || n % (i + 2) == 0) 
            return false; 
      
        return true; 
    } 
    static boolean isPowerOfTwo(long n)
    {
        if(n==0)
        return false;
 
        return (long)(Math.ceil((Math.log(n) / Math.log(2)))) == 
         (long)(Math.floor(((Math.log(n) / Math.log(2)))));
    }
//    static int nCr(int n, int r) 
//{ 
//    return fact(n) / (fact(r) * 
//                  fact(n - r)); 
//} 
//  
//// Returns factorial of n 
//static int fact(int n) 
//{ 
//    int res = 1; 
//    for (int i = 2; i <= n; i++) 
//        res = res * i; 
//    return res; 
//} 
    public static long getFact(int n){
        long ans = 1;
        while (n > 0){
            ans *= n;
            ans %= MOD;
            n--;
        }
        return ans;
    }
    public static long pow(long n, int pow){
        if (pow == 0)
            return 1;
        long temp = pow(n, pow/2)%MOD;
        temp *= temp;
        temp %= MOD;
        if (pow % 2 == 1)
            temp *= n;
        temp %= MOD;
        return temp;
 
    }
    public static long nCr(int n, int r){
        long ans = 1;
        int temp = n-r;
        while (n > temp){
            ans *= n;
            ans %= MOD;
            n--;
        }
        ans *= pow(getFact(r)%MOD, MOD-2)%MOD;
        ans %= MOD;
        return ans;
    }
    

}
