import java.util.*;
import java.util.Scanner;
import java.io.*;
import javax.lang.model.util.ElementScanner6; 

public class Main
{

    public static void main(String args[])
    {  

        FastReader in=new FastReader();
        PrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        int t=1;
     
        //t=in.nextInt();
        while(t-->0)
        {
           long a=in.nextLong();
           long b=in.nextLong();
           long c=in.nextLong();
           long d=in.nextLong();
           
                long m1=a*c;
                long m2=a*d;
                long m3=b*c;
                long m4=b*d;
                pr.println(Math.max(m1,Math.max(m2,Math.max(m3, m4))));
            

        }
        pr.flush();
    }



    
    static int gcd(int a,int b)
    {
        
        if(a==0)
            return b;
        return gcd(a%b,b);
    }

    static int lcm(int a,int b)
    {
        return (a*b)/gcd(a,b);
    }


    static boolean prime[];

    static void sieveofe()
    {
        int n=1000000;
      
        prime=new boolean[n+1];
        Arrays.fill(prime,true);
        prime[1]=false;
        for(int i=2;i*i<=n;i++)
        {
            if(prime[i]==true)
            {
                for(int j=i*i;j<=n;j+=i)
                {
                    prime[j]=false;
                }
            }
        }
      
        
    }
    
    static void sort(long[] a) {
		ArrayList<Long> l = new ArrayList<>();
		for (long i : a)
			l.add(i);
		Collections.sort(l);
		for (int i = 0; i < a.length; i++)
			a[i] = l.get(i);
	}
    
    
	static void sort(int[] a) {
		ArrayList<Integer> l = new ArrayList<>();
		for (int i : a)
			l.add(i);
		Collections.sort(l);
		for (int i = 0; i < a.length; i++)
			a[i] = l.get(i);
    }

    
    static class FastReader
    { 
        BufferedReader br; 
        StringTokenizer st; 

        public FastReader() 
        { 
            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; 
        } 
    } 

    
   
} import java.util.*; util.* java import java.util.Scanner; Scanner java.util import java.io.*; io.* java import javax.lang.model.util.ElementScanner6; ElementScanner6 javax.lang.model.util public class Main
{

    public static void main(String args[])
    {  

        FastReader in=new FastReader();
        PrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        int t=1;
     
        //t=in.nextInt();
        while(t-->0)
        {
           long a=in.nextLong();
           long b=in.nextLong();
           long c=in.nextLong();
           long d=in.nextLong();
           
                long m1=a*c;
                long m2=a*d;
                long m3=b*c;
                long m4=b*d;
                pr.println(Math.max(m1,Math.max(m2,Math.max(m3, m4))));
            

        }
        pr.flush();
    }



    
    static int gcd(int a,int b)
    {
        
        if(a==0)
            return b;
        return gcd(a%b,b);
    }

    static int lcm(int a,int b)
    {
        return (a*b)/gcd(a,b);
    }


    static boolean prime[];

    static void sieveofe()
    {
        int n=1000000;
      
        prime=new boolean[n+1];
        Arrays.fill(prime,true);
        prime[1]=false;
        for(int i=2;i*i<=n;i++)
        {
            if(prime[i]==true)
            {
                for(int j=i*i;j<=n;j+=i)
                {
                    prime[j]=false;
                }
            }
        }
      
        
    }
    
    static void sort(long[] a) {
		ArrayList<Long> l = new ArrayList<>();
		for (long i : a)
			l.add(i);
		Collections.sort(l);
		for (int i = 0; i < a.length; i++)
			a[i] = l.get(i);
	}
    
    
	static void sort(int[] a) {
		ArrayList<Integer> l = new ArrayList<>();
		for (int i : a)
			l.add(i);
		Collections.sort(l);
		for (int i = 0; i < a.length; i++)
			a[i] = l.get(i);
    }

    
    static class FastReader
    { 
        BufferedReader br; 
        StringTokenizer st; 

        public FastReader() 
        { 
            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; 
        } 
    } 

    
   
} Main static boolean prime[]; prime public static void main(String args[])
    {  

        FastReader in=new FastReader();
        PrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        int t=1;
     
        //t=in.nextInt();
        while(t-->0)
        {
           long a=in.nextLong();
           long b=in.nextLong();
           long c=in.nextLong();
           long d=in.nextLong();
           
                long m1=a*c;
                long m2=a*d;
                long m3=b*c;
                long m4=b*d;
                pr.println(Math.max(m1,Math.max(m2,Math.max(m3, m4))));
            

        }
        pr.flush();
    } main {  

        FastReader in=new FastReader();
        PrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        int t=1;
     
        //t=in.nextInt();
        while(t-->0)
        {
           long a=in.nextLong();
           long b=in.nextLong();
           long c=in.nextLong();
           long d=in.nextLong();
           
                long m1=a*c;
                long m2=a*d;
                long m3=b*c;
                long m4=b*d;
                pr.println(Math.max(m1,Math.max(m2,Math.max(m3, m4))));
            

        }
        pr.flush();
    } FastReader in=new FastReader(); in new FastReader() PrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))); pr new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))) int t=1; t 1 while(t-->0)
        {
           long a=in.nextLong();
           long b=in.nextLong();
           long c=in.nextLong();
           long d=in.nextLong();
           
                long m1=a*c;
                long m2=a*d;
                long m3=b*c;
                long m4=b*d;
                pr.println(Math.max(m1,Math.max(m2,Math.max(m3, m4))));
            

        } t-->0 t-- t 0 {
           long a=in.nextLong();
           long b=in.nextLong();
           long c=in.nextLong();
           long d=in.nextLong();
           
                long m1=a*c;
                long m2=a*d;
                long m3=b*c;
                long m4=b*d;
                pr.println(Math.max(m1,Math.max(m2,Math.max(m3, m4))));
            

        } long a=in.nextLong(); a in.nextLong() in.nextLong in long b=in.nextLong(); b in.nextLong() in.nextLong in long c=in.nextLong(); c in.nextLong() in.nextLong in long d=in.nextLong(); d in.nextLong() in.nextLong in long m1=a*c; m1 a*c a c long m2=a*d; m2 a*d a d long m3=b*c; m3 b*c b c long m4=b*d; m4 b*d b d pr.println(Math.max(m1,Math.max(m2,Math.max(m3, m4)))) pr.println pr Math.max(m1,Math.max(m2,Math.max(m3, m4))) Math.max Math m1 Math.max(m2,Math.max(m3, m4)) Math.max Math m2 Math.max(m3, m4) Math.max Math m3 m4 pr.flush() pr.flush pr String args[] args static int gcd(int a,int b)
    {
        
        if(a==0)
            return b;
        return gcd(a%b,b);
    } gcd {
        
        if(a==0)
            return b;
        return gcd(a%b,b);
    } if(a==0)
            return b; a==0 a 0 return b; b return gcd(a%b,b); gcd(a%b,b) gcd a%b a b b int a a int b b static int lcm(int a,int b)
    {
        return (a*b)/gcd(a,b);
    } lcm {
        return (a*b)/gcd(a,b);
    } return (a*b)/gcd(a,b); (a*b)/gcd(a,b) (a*b) a b gcd(a,b) gcd a b int a a int b b static void sieveofe()
    {
        int n=1000000;
      
        prime=new boolean[n+1];
        Arrays.fill(prime,true);
        prime[1]=false;
        for(int i=2;i*i<=n;i++)
        {
            if(prime[i]==true)
            {
                for(int j=i*i;j<=n;j+=i)
                {
                    prime[j]=false;
                }
            }
        }
      
        
    } sieveofe {
        int n=1000000;
      
        prime=new boolean[n+1];
        Arrays.fill(prime,true);
        prime[1]=false;
        for(int i=2;i*i<=n;i++)
        {
            if(prime[i]==true)
            {
                for(int j=i*i;j<=n;j+=i)
                {
                    prime[j]=false;
                }
            }
        }
      
        
    } int n=1000000; n 1000000 prime=new boolean[n+1] prime new boolean[n+1] n+1 n 1 Arrays.fill(prime,true) Arrays.fill Arrays prime true prime[1]=false prime[1] prime 1 false for(int i=2;i*i<=n;i++)
        {
            if(prime[i]==true)
            {
                for(int j=i*i;j<=n;j+=i)
                {
                    prime[j]=false;
                }
            }
        } int i=2; int i=2; i 2 i*i<=n i*i i i n i++ i++ i {
            if(prime[i]==true)
            {
                for(int j=i*i;j<=n;j+=i)
                {
                    prime[j]=false;
                }
            }
        } {
            if(prime[i]==true)
            {
                for(int j=i*i;j<=n;j+=i)
                {
                    prime[j]=false;
                }
            }
        } if(prime[i]==true)
            {
                for(int j=i*i;j<=n;j+=i)
                {
                    prime[j]=false;
                }
            } prime[i]==true prime[i] prime i true {
                for(int j=i*i;j<=n;j+=i)
                {
                    prime[j]=false;
                }
            } for(int j=i*i;j<=n;j+=i)
                {
                    prime[j]=false;
                } int j=i*i; int j=i*i; j i*i i i j<=n j n j+=i j+=i j i {
                    prime[j]=false;
                } {
                    prime[j]=false;
                } prime[j]=false prime[j] prime j false static void sort(long[] a) {
		ArrayList<Long> l = new ArrayList<>();
		for (long i : a)
			l.add(i);
		Collections.sort(l);
		for (int i = 0; i < a.length; i++)
			a[i] = l.get(i);
	} sort {
		ArrayList<Long> l = new ArrayList<>();
		for (long i : a)
			l.add(i);
		Collections.sort(l);
		for (int i = 0; i < a.length; i++)
			a[i] = l.get(i);
	} ArrayList<Long> l = new ArrayList<>(); l new ArrayList<>() for (long i : a)
			l.add(i); long i a l.add(i); l.add(i) l.add l i Collections.sort(l) Collections.sort Collections l for (int i = 0; i < a.length; i++)
			a[i] = l.get(i); int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i a[i] = l.get(i); a[i] = l.get(i) a[i] a i l.get(i) l.get l i long[] a a static void sort(int[] a) {
		ArrayList<Integer> l = new ArrayList<>();
		for (int i : a)
			l.add(i);
		Collections.sort(l);
		for (int i = 0; i < a.length; i++)
			a[i] = l.get(i);
    } sort {
		ArrayList<Integer> l = new ArrayList<>();
		for (int i : a)
			l.add(i);
		Collections.sort(l);
		for (int i = 0; i < a.length; i++)
			a[i] = l.get(i);
    } ArrayList<Integer> l = new ArrayList<>(); l new ArrayList<>() for (int i : a)
			l.add(i); int i a l.add(i); l.add(i) l.add l i Collections.sort(l) Collections.sort Collections l for (int i = 0; i < a.length; i++)
			a[i] = l.get(i); int i = 0; int i = 0; i 0 i < a.length i a.length a a.length i++ i++ i a[i] = l.get(i); a[i] = l.get(i) a[i] a i l.get(i) l.get l i int[] a a static class FastReader
    { 
        BufferedReader br; 
        StringTokenizer st; 

        public FastReader() 
        { 
            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; 
        } 
    } FastReader BufferedReader br; br StringTokenizer st; st public FastReader() 
        { 
            br = new BufferedReader(new
                    InputStreamReader(System.in)); 
        } FastReader { 
            br = new BufferedReader(new
                    InputStreamReader(System.in)); 
        } br = new BufferedReader(new
                    InputStreamReader(System.in)) 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(); 
        } next { 
            while (st == null || !st.hasMoreElements()) 
            { 
                try
                { 
                    st = new StringTokenizer(br.readLine()); 
                } 
                catch (IOException  e) 
                { 
                    e.printStackTrace(); 
                } 
            } 
            return st.nextToken(); 
        } while (st == null || !st.hasMoreElements()) 
            { 
                try
                { 
                    st = new StringTokenizer(br.readLine()); 
                } 
                catch (IOException  e) 
                { 
                    e.printStackTrace(); 
                } 
            } st == null || !st.hasMoreElements() st == null st null !st.hasMoreElements() st.hasMoreElements() st.hasMoreElements st { 
                try
                { 
                    st = new StringTokenizer(br.readLine()); 
                } 
                catch (IOException  e) 
                { 
                    e.printStackTrace(); 
                } 
            } try
                { 
                    st = new StringTokenizer(br.readLine()); 
                } 
                catch (IOException  e) 
                { 
                    e.printStackTrace(); 
                } catch (IOException  e) 
                { 
                    e.printStackTrace(); 
                } IOException  e { 
                    e.printStackTrace(); 
                } e.printStackTrace() e.printStackTrace e { 
                    st = new StringTokenizer(br.readLine()); 
                } st = new StringTokenizer(br.readLine()) st new StringTokenizer(br.readLine()) return st.nextToken(); st.nextToken() st.nextToken st int nextInt() 
        { 
            return Integer.parseInt(next()); 
        } nextInt { 
            return Integer.parseInt(next()); 
        } return Integer.parseInt(next()); Integer.parseInt(next()) Integer.parseInt Integer next() next long nextLong() 
        { 
            return Long.parseLong(next()); 
        } nextLong { 
            return Long.parseLong(next()); 
        } return Long.parseLong(next()); Long.parseLong(next()) Long.parseLong Long next() next double nextDouble() 
        { 
            return Double.parseDouble(next()); 
        } nextDouble { 
            return Double.parseDouble(next()); 
        } return Double.parseDouble(next()); Double.parseDouble(next()) Double.parseDouble Double next() next String nextLine() 
        { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } nextLine { 
            String str = ""; 
            try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } 
            return str; 
        } String str = ""; str "" try
            { 
                str = br.readLine(); 
            } 
            catch (IOException e) 
            { 
                e.printStackTrace(); 
            } catch (IOException e) 
            { 
                e.printStackTrace(); 
            } IOException e { 
                e.printStackTrace(); 
            } e.printStackTrace() e.printStackTrace e { 
                str = br.readLine(); 
            } str = br.readLine() str br.readLine() br.readLine br return str; str public class Main
{

    public static void main(String args[])
    {  

        FastReader in=new FastReader();
        PrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        int t=1;
     
        //t=in.nextInt();
        while(t-->0)
        {
           long a=in.nextLong();
           long b=in.nextLong();
           long c=in.nextLong();
           long d=in.nextLong();
           
                long m1=a*c;
                long m2=a*d;
                long m3=b*c;
                long m4=b*d;
                pr.println(Math.max(m1,Math.max(m2,Math.max(m3, m4))));
            

        }
        pr.flush();
    }



    
    static int gcd(int a,int b)
    {
        
        if(a==0)
            return b;
        return gcd(a%b,b);
    }

    static int lcm(int a,int b)
    {
        return (a*b)/gcd(a,b);
    }


    static boolean prime[];

    static void sieveofe()
    {
        int n=1000000;
      
        prime=new boolean[n+1];
        Arrays.fill(prime,true);
        prime[1]=false;
        for(int i=2;i*i<=n;i++)
        {
            if(prime[i]==true)
            {
                for(int j=i*i;j<=n;j+=i)
                {
                    prime[j]=false;
                }
            }
        }
      
        
    }
    
    static void sort(long[] a) {
		ArrayList<Long> l = new ArrayList<>();
		for (long i : a)
			l.add(i);
		Collections.sort(l);
		for (int i = 0; i < a.length; i++)
			a[i] = l.get(i);
	}
    
    
	static void sort(int[] a) {
		ArrayList<Integer> l = new ArrayList<>();
		for (int i : a)
			l.add(i);
		Collections.sort(l);
		for (int i = 0; i < a.length; i++)
			a[i] = l.get(i);
    }

    
    static class FastReader
    { 
        BufferedReader br; 
        StringTokenizer st; 

        public FastReader() 
        { 
            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 class Main
{

    public static void main(String args[])
    {  

        FastReader in=new FastReader();
        PrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        int t=1;
     
        //t=in.nextInt();
        while(t-->0)
        {
           long a=in.nextLong();
           long b=in.nextLong();
           long c=in.nextLong();
           long d=in.nextLong();
           
                long m1=a*c;
                long m2=a*d;
                long m3=b*c;
                long m4=b*d;
                pr.println(Math.max(m1,Math.max(m2,Math.max(m3, m4))));
            

        }
        pr.flush();
    }



    
    static int gcd(int a,int b)
    {
        
        if(a==0)
            return b;
        return gcd(a%b,b);
    }

    static int lcm(int a,int b)
    {
        return (a*b)/gcd(a,b);
    }


    static boolean prime[];

    static void sieveofe()
    {
        int n=1000000;
      
        prime=new boolean[n+1];
        Arrays.fill(prime,true);
        prime[1]=false;
        for(int i=2;i*i<=n;i++)
        {
            if(prime[i]==true)
            {
                for(int j=i*i;j<=n;j+=i)
                {
                    prime[j]=false;
                }
            }
        }
      
        
    }
    
    static void sort(long[] a) {
		ArrayList<Long> l = new ArrayList<>();
		for (long i : a)
			l.add(i);
		Collections.sort(l);
		for (int i = 0; i < a.length; i++)
			a[i] = l.get(i);
	}
    
    
	static void sort(int[] a) {
		ArrayList<Integer> l = new ArrayList<>();
		for (int i : a)
			l.add(i);
		Collections.sort(l);
		for (int i = 0; i < a.length; i++)
			a[i] = l.get(i);
    }

    
    static class FastReader
    { 
        BufferedReader br; 
        StringTokenizer st; 

        public FastReader() 
        { 
            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; 
        } 
    } 

    
   
} Main
import java.util.*;
import java.util.Scanner;
import java.io.*;
import javax.lang.model.util.ElementScanner6; 

public class Main
{

    public static void main(String args[])
    {  

        FastReader in=new FastReader();
        PrintWriter pr = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        int t=1;
     
        //t=in.nextInt();
        while(t-->0)
        {
           long a=in.nextLong();
           long b=in.nextLong();
           long c=in.nextLong();
           long d=in.nextLong();
           
                long m1=a*c;
                long m2=a*d;
                long m3=b*c;
                long m4=b*d;
                pr.println(Math.max(m1,Math.max(m2,Math.max(m3, m4))));
            

        }
        pr.flush();
    }



    
    static int gcd(int a,int b)
    {
        
        if(a==0)
            return b;
        return gcd(a%b,b);
    }

    static int lcm(int a,int b)
    {
        return (a*b)/gcd(a,b);
    }


    static boolean prime[];

    static void sieveofe()
    {
        int n=1000000;
      
        prime=new boolean[n+1];
        Arrays.fill(prime,true);
        prime[1]=false;
        for(int i=2;i*i<=n;i++)
        {
            if(prime[i]==true)
            {
                for(int j=i*i;j<=n;j+=i)
                {
                    prime[j]=false;
                }
            }
        }
      
        
    }
    
    static void sort(long[] a) {
		ArrayList<Long> l = new ArrayList<>();
		for (long i : a)
			l.add(i);
		Collections.sort(l);
		for (int i = 0; i < a.length; i++)
			a[i] = l.get(i);
	}
    
    
	static void sort(int[] a) {
		ArrayList<Integer> l = new ArrayList<>();
		for (int i : a)
			l.add(i);
		Collections.sort(l);
		for (int i = 0; i < a.length; i++)
			a[i] = l.get(i);
    }

    
    static class FastReader
    { 
        BufferedReader br; 
        StringTokenizer st; 

        public FastReader() 
        { 
            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; 
        } 
    } 

    
   
}