import java.io.*;
import java.util.*;

public class Main {

	final static long MOD = 1000000007;
	public static String[] Ws = null;
	public static int wsIndx = 0;
	public static BufferedReader in = null;
	public static long cnt=0;
	public static PrintWriter pw = new PrintWriter(System.out);
	public static void main(String[] args) throws Exception {
		solution(args);
		if(in!=null){
			in.close();
		}
		pw.flush();
		pw.close();
	}

	public static void solution(String[] args) throws Exception{
		long L = nextLong();
		long R = nextLong();
		HashMap<Integer,Integer> map = new HashMap<>();
		for(int i=0;i<=2019;i++){
			map.put(i, i);
		}
		long ans =2019;
		for(long i=L;i<R;i++){
			HashMap<Integer,Integer> tmp = new HashMap<>();
			for(long k=i+1;k<=R;k++){
				int x = (int)((i%2019)*(k%2019))%2019;
				ans = Math.min(ans, x);
				if(tmp.containsKey(x)){
					break;
				}
				tmp.put(x, x);
			}
			for(int x:tmp.keySet()){
				map.remove(x);
			}
			if(ans==0||map.size()==0){
				break;
			}
		}
		pw.println(ans);

	}

	public static void dfs(int n,int cnt,ArrayList<Integer>[] tree,int parent,int[] set){
		if(n!=parent&&tree[n].size()==1){
			set[n]=cnt;
			return;
		}
		for(int x:tree[n]){
			if(x==parent){
				continue;
			}
			dfs(x,cnt+1,tree,n,set);
		}
	}


	public static void check() throws Exception{
		if(in == null){
			in = new BufferedReader(new InputStreamReader(System.in));
		}
		if(Ws==null || Ws.length<=wsIndx){
			Ws = in.readLine().split(" ");
			wsIndx=0;
		}
	}
	public static int nextInt()throws Exception{
		check();
		return Integer.parseInt(Ws[wsIndx++]);
	}

	public static long nextLong()throws Exception{
		check();
		return Long.parseLong(Ws[wsIndx++]);
	}

	public static String nextString()throws Exception{
		check();
		return Ws[wsIndx++];
	}

	public static int[] nextInts()throws Exception{
		check();
		int[] tmp = new int[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Integer.parseInt(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static long[] nextLongs()throws Exception{
		check();
		long[] tmp = new long[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Long.parseLong(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static String[] nextStrings()throws Exception{
		check();
		wsIndx=Ws.length;
		return Ws;
	}

}
 import java.io.*; io.* java import java.util.*; util.* java public class Main {

	final static long MOD = 1000000007;
	public static String[] Ws = null;
	public static int wsIndx = 0;
	public static BufferedReader in = null;
	public static long cnt=0;
	public static PrintWriter pw = new PrintWriter(System.out);
	public static void main(String[] args) throws Exception {
		solution(args);
		if(in!=null){
			in.close();
		}
		pw.flush();
		pw.close();
	}

	public static void solution(String[] args) throws Exception{
		long L = nextLong();
		long R = nextLong();
		HashMap<Integer,Integer> map = new HashMap<>();
		for(int i=0;i<=2019;i++){
			map.put(i, i);
		}
		long ans =2019;
		for(long i=L;i<R;i++){
			HashMap<Integer,Integer> tmp = new HashMap<>();
			for(long k=i+1;k<=R;k++){
				int x = (int)((i%2019)*(k%2019))%2019;
				ans = Math.min(ans, x);
				if(tmp.containsKey(x)){
					break;
				}
				tmp.put(x, x);
			}
			for(int x:tmp.keySet()){
				map.remove(x);
			}
			if(ans==0||map.size()==0){
				break;
			}
		}
		pw.println(ans);

	}

	public static void dfs(int n,int cnt,ArrayList<Integer>[] tree,int parent,int[] set){
		if(n!=parent&&tree[n].size()==1){
			set[n]=cnt;
			return;
		}
		for(int x:tree[n]){
			if(x==parent){
				continue;
			}
			dfs(x,cnt+1,tree,n,set);
		}
	}


	public static void check() throws Exception{
		if(in == null){
			in = new BufferedReader(new InputStreamReader(System.in));
		}
		if(Ws==null || Ws.length<=wsIndx){
			Ws = in.readLine().split(" ");
			wsIndx=0;
		}
	}
	public static int nextInt()throws Exception{
		check();
		return Integer.parseInt(Ws[wsIndx++]);
	}

	public static long nextLong()throws Exception{
		check();
		return Long.parseLong(Ws[wsIndx++]);
	}

	public static String nextString()throws Exception{
		check();
		return Ws[wsIndx++];
	}

	public static int[] nextInts()throws Exception{
		check();
		int[] tmp = new int[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Integer.parseInt(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static long[] nextLongs()throws Exception{
		check();
		long[] tmp = new long[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Long.parseLong(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static String[] nextStrings()throws Exception{
		check();
		wsIndx=Ws.length;
		return Ws;
	}

} Main final static long MOD = 1000000007; MOD 1000000007 public static String[] Ws = null; Ws null public static int wsIndx = 0; wsIndx 0 public static BufferedReader in = null; in null public static long cnt=0; cnt 0 public static PrintWriter pw = new PrintWriter(System.out); pw new PrintWriter(System.out) public static void main(String[] args) throws Exception {
		solution(args);
		if(in!=null){
			in.close();
		}
		pw.flush();
		pw.close();
	} main {
		solution(args);
		if(in!=null){
			in.close();
		}
		pw.flush();
		pw.close();
	} solution(args) solution args if(in!=null){
			in.close();
		} in!=null in null {
			in.close();
		} in.close() in.close in pw.flush() pw.flush pw pw.close() pw.close pw String[] args args public static void solution(String[] args) throws Exception{
		long L = nextLong();
		long R = nextLong();
		HashMap<Integer,Integer> map = new HashMap<>();
		for(int i=0;i<=2019;i++){
			map.put(i, i);
		}
		long ans =2019;
		for(long i=L;i<R;i++){
			HashMap<Integer,Integer> tmp = new HashMap<>();
			for(long k=i+1;k<=R;k++){
				int x = (int)((i%2019)*(k%2019))%2019;
				ans = Math.min(ans, x);
				if(tmp.containsKey(x)){
					break;
				}
				tmp.put(x, x);
			}
			for(int x:tmp.keySet()){
				map.remove(x);
			}
			if(ans==0||map.size()==0){
				break;
			}
		}
		pw.println(ans);

	} solution {
		long L = nextLong();
		long R = nextLong();
		HashMap<Integer,Integer> map = new HashMap<>();
		for(int i=0;i<=2019;i++){
			map.put(i, i);
		}
		long ans =2019;
		for(long i=L;i<R;i++){
			HashMap<Integer,Integer> tmp = new HashMap<>();
			for(long k=i+1;k<=R;k++){
				int x = (int)((i%2019)*(k%2019))%2019;
				ans = Math.min(ans, x);
				if(tmp.containsKey(x)){
					break;
				}
				tmp.put(x, x);
			}
			for(int x:tmp.keySet()){
				map.remove(x);
			}
			if(ans==0||map.size()==0){
				break;
			}
		}
		pw.println(ans);

	} long L = nextLong(); L nextLong() nextLong long R = nextLong(); R nextLong() nextLong HashMap<Integer,Integer> map = new HashMap<>(); map new HashMap<>() for(int i=0;i<=2019;i++){
			map.put(i, i);
		} int i=0; int i=0; i 0 i<=2019 i 2019 i++ i++ i {
			map.put(i, i);
		} {
			map.put(i, i);
		} map.put(i, i) map.put map i i long ans =2019; ans 2019 for(long i=L;i<R;i++){
			HashMap<Integer,Integer> tmp = new HashMap<>();
			for(long k=i+1;k<=R;k++){
				int x = (int)((i%2019)*(k%2019))%2019;
				ans = Math.min(ans, x);
				if(tmp.containsKey(x)){
					break;
				}
				tmp.put(x, x);
			}
			for(int x:tmp.keySet()){
				map.remove(x);
			}
			if(ans==0||map.size()==0){
				break;
			}
		} long i=L; long i=L; i L i<R i R i++ i++ i {
			HashMap<Integer,Integer> tmp = new HashMap<>();
			for(long k=i+1;k<=R;k++){
				int x = (int)((i%2019)*(k%2019))%2019;
				ans = Math.min(ans, x);
				if(tmp.containsKey(x)){
					break;
				}
				tmp.put(x, x);
			}
			for(int x:tmp.keySet()){
				map.remove(x);
			}
			if(ans==0||map.size()==0){
				break;
			}
		} {
			HashMap<Integer,Integer> tmp = new HashMap<>();
			for(long k=i+1;k<=R;k++){
				int x = (int)((i%2019)*(k%2019))%2019;
				ans = Math.min(ans, x);
				if(tmp.containsKey(x)){
					break;
				}
				tmp.put(x, x);
			}
			for(int x:tmp.keySet()){
				map.remove(x);
			}
			if(ans==0||map.size()==0){
				break;
			}
		} HashMap<Integer,Integer> tmp = new HashMap<>(); tmp new HashMap<>() for(long k=i+1;k<=R;k++){
				int x = (int)((i%2019)*(k%2019))%2019;
				ans = Math.min(ans, x);
				if(tmp.containsKey(x)){
					break;
				}
				tmp.put(x, x);
			} long k=i+1; long k=i+1; k i+1 i 1 k<=R k R k++ k++ k {
				int x = (int)((i%2019)*(k%2019))%2019;
				ans = Math.min(ans, x);
				if(tmp.containsKey(x)){
					break;
				}
				tmp.put(x, x);
			} {
				int x = (int)((i%2019)*(k%2019))%2019;
				ans = Math.min(ans, x);
				if(tmp.containsKey(x)){
					break;
				}
				tmp.put(x, x);
			} int x = (int)((i%2019)*(k%2019))%2019; x (int)((i%2019)*(k%2019))%2019 (int)((i%2019)*(k%2019)) (i%2019) i 2019 (k%2019) k 2019 2019 ans = Math.min(ans, x) ans Math.min(ans, x) Math.min Math ans x if(tmp.containsKey(x)){
					break;
				} tmp.containsKey(x) tmp.containsKey tmp x {
					break;
				} break; tmp.put(x, x) tmp.put tmp x x for(int x:tmp.keySet()){
				map.remove(x);
			} int x tmp.keySet() tmp.keySet tmp {
				map.remove(x);
			} {
				map.remove(x);
			} map.remove(x) map.remove map x if(ans==0||map.size()==0){
				break;
			} ans==0||map.size()==0 ans==0 ans 0 map.size()==0 map.size() map.size map 0 {
				break;
			} break; pw.println(ans) pw.println pw ans String[] args args public static void dfs(int n,int cnt,ArrayList<Integer>[] tree,int parent,int[] set){
		if(n!=parent&&tree[n].size()==1){
			set[n]=cnt;
			return;
		}
		for(int x:tree[n]){
			if(x==parent){
				continue;
			}
			dfs(x,cnt+1,tree,n,set);
		}
	} dfs {
		if(n!=parent&&tree[n].size()==1){
			set[n]=cnt;
			return;
		}
		for(int x:tree[n]){
			if(x==parent){
				continue;
			}
			dfs(x,cnt+1,tree,n,set);
		}
	} if(n!=parent&&tree[n].size()==1){
			set[n]=cnt;
			return;
		} n!=parent&&tree[n].size()==1 n!=parent n parent tree[n].size()==1 tree[n].size() tree[n].size tree[n] tree n 1 {
			set[n]=cnt;
			return;
		} set[n]=cnt set[n] set n cnt return; for(int x:tree[n]){
			if(x==parent){
				continue;
			}
			dfs(x,cnt+1,tree,n,set);
		} int x tree[n] tree n {
			if(x==parent){
				continue;
			}
			dfs(x,cnt+1,tree,n,set);
		} {
			if(x==parent){
				continue;
			}
			dfs(x,cnt+1,tree,n,set);
		} if(x==parent){
				continue;
			} x==parent x parent {
				continue;
			} continue; dfs(x,cnt+1,tree,n,set) dfs x cnt+1 cnt 1 tree n set int n n int cnt cnt ArrayList<Integer>[] tree tree int parent parent int[] set set public static void check() throws Exception{
		if(in == null){
			in = new BufferedReader(new InputStreamReader(System.in));
		}
		if(Ws==null || Ws.length<=wsIndx){
			Ws = in.readLine().split(" ");
			wsIndx=0;
		}
	} check {
		if(in == null){
			in = new BufferedReader(new InputStreamReader(System.in));
		}
		if(Ws==null || Ws.length<=wsIndx){
			Ws = in.readLine().split(" ");
			wsIndx=0;
		}
	} if(in == null){
			in = new BufferedReader(new InputStreamReader(System.in));
		} in == null in null {
			in = new BufferedReader(new InputStreamReader(System.in));
		} in = new BufferedReader(new InputStreamReader(System.in)) in new BufferedReader(new InputStreamReader(System.in)) if(Ws==null || Ws.length<=wsIndx){
			Ws = in.readLine().split(" ");
			wsIndx=0;
		} Ws==null || Ws.length<=wsIndx Ws==null Ws null Ws.length<=wsIndx Ws.length Ws Ws.length wsIndx {
			Ws = in.readLine().split(" ");
			wsIndx=0;
		} Ws = in.readLine().split(" ") Ws in.readLine().split(" ") in.readLine().split in.readLine() in.readLine in " " wsIndx=0 wsIndx 0 public static int nextInt()throws Exception{
		check();
		return Integer.parseInt(Ws[wsIndx++]);
	} nextInt {
		check();
		return Integer.parseInt(Ws[wsIndx++]);
	} check() check return Integer.parseInt(Ws[wsIndx++]); Integer.parseInt(Ws[wsIndx++]) Integer.parseInt Integer Ws[wsIndx++] Ws wsIndx++ wsIndx public static long nextLong()throws Exception{
		check();
		return Long.parseLong(Ws[wsIndx++]);
	} nextLong {
		check();
		return Long.parseLong(Ws[wsIndx++]);
	} check() check return Long.parseLong(Ws[wsIndx++]); Long.parseLong(Ws[wsIndx++]) Long.parseLong Long Ws[wsIndx++] Ws wsIndx++ wsIndx public static String nextString()throws Exception{
		check();
		return Ws[wsIndx++];
	} nextString {
		check();
		return Ws[wsIndx++];
	} check() check return Ws[wsIndx++]; Ws[wsIndx++] Ws wsIndx++ wsIndx public static int[] nextInts()throws Exception{
		check();
		int[] tmp = new int[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Integer.parseInt(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	} nextInts {
		check();
		int[] tmp = new int[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Integer.parseInt(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	} check() check int[] tmp = new int[Ws.length]; tmp new int[Ws.length] Ws.length Ws Ws.length for(int i=0;i<tmp.length;i++){
			tmp[i]=Integer.parseInt(Ws[i]);
		} int i=0; int i=0; i 0 i<tmp.length i tmp.length tmp tmp.length i++ i++ i {
			tmp[i]=Integer.parseInt(Ws[i]);
		} {
			tmp[i]=Integer.parseInt(Ws[i]);
		} tmp[i]=Integer.parseInt(Ws[i]) tmp[i] tmp i Integer.parseInt(Ws[i]) Integer.parseInt Integer Ws[i] Ws i wsIndx=Ws.length wsIndx Ws.length Ws Ws.length return tmp; tmp public static long[] nextLongs()throws Exception{
		check();
		long[] tmp = new long[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Long.parseLong(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	} nextLongs {
		check();
		long[] tmp = new long[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Long.parseLong(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	} check() check long[] tmp = new long[Ws.length]; tmp new long[Ws.length] Ws.length Ws Ws.length for(int i=0;i<tmp.length;i++){
			tmp[i]=Long.parseLong(Ws[i]);
		} int i=0; int i=0; i 0 i<tmp.length i tmp.length tmp tmp.length i++ i++ i {
			tmp[i]=Long.parseLong(Ws[i]);
		} {
			tmp[i]=Long.parseLong(Ws[i]);
		} tmp[i]=Long.parseLong(Ws[i]) tmp[i] tmp i Long.parseLong(Ws[i]) Long.parseLong Long Ws[i] Ws i wsIndx=Ws.length wsIndx Ws.length Ws Ws.length return tmp; tmp public static String[] nextStrings()throws Exception{
		check();
		wsIndx=Ws.length;
		return Ws;
	} nextStrings {
		check();
		wsIndx=Ws.length;
		return Ws;
	} check() check wsIndx=Ws.length wsIndx Ws.length Ws Ws.length return Ws; Ws public class Main {

	final static long MOD = 1000000007;
	public static String[] Ws = null;
	public static int wsIndx = 0;
	public static BufferedReader in = null;
	public static long cnt=0;
	public static PrintWriter pw = new PrintWriter(System.out);
	public static void main(String[] args) throws Exception {
		solution(args);
		if(in!=null){
			in.close();
		}
		pw.flush();
		pw.close();
	}

	public static void solution(String[] args) throws Exception{
		long L = nextLong();
		long R = nextLong();
		HashMap<Integer,Integer> map = new HashMap<>();
		for(int i=0;i<=2019;i++){
			map.put(i, i);
		}
		long ans =2019;
		for(long i=L;i<R;i++){
			HashMap<Integer,Integer> tmp = new HashMap<>();
			for(long k=i+1;k<=R;k++){
				int x = (int)((i%2019)*(k%2019))%2019;
				ans = Math.min(ans, x);
				if(tmp.containsKey(x)){
					break;
				}
				tmp.put(x, x);
			}
			for(int x:tmp.keySet()){
				map.remove(x);
			}
			if(ans==0||map.size()==0){
				break;
			}
		}
		pw.println(ans);

	}

	public static void dfs(int n,int cnt,ArrayList<Integer>[] tree,int parent,int[] set){
		if(n!=parent&&tree[n].size()==1){
			set[n]=cnt;
			return;
		}
		for(int x:tree[n]){
			if(x==parent){
				continue;
			}
			dfs(x,cnt+1,tree,n,set);
		}
	}


	public static void check() throws Exception{
		if(in == null){
			in = new BufferedReader(new InputStreamReader(System.in));
		}
		if(Ws==null || Ws.length<=wsIndx){
			Ws = in.readLine().split(" ");
			wsIndx=0;
		}
	}
	public static int nextInt()throws Exception{
		check();
		return Integer.parseInt(Ws[wsIndx++]);
	}

	public static long nextLong()throws Exception{
		check();
		return Long.parseLong(Ws[wsIndx++]);
	}

	public static String nextString()throws Exception{
		check();
		return Ws[wsIndx++];
	}

	public static int[] nextInts()throws Exception{
		check();
		int[] tmp = new int[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Integer.parseInt(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static long[] nextLongs()throws Exception{
		check();
		long[] tmp = new long[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Long.parseLong(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static String[] nextStrings()throws Exception{
		check();
		wsIndx=Ws.length;
		return Ws;
	}

} public class Main {

	final static long MOD = 1000000007;
	public static String[] Ws = null;
	public static int wsIndx = 0;
	public static BufferedReader in = null;
	public static long cnt=0;
	public static PrintWriter pw = new PrintWriter(System.out);
	public static void main(String[] args) throws Exception {
		solution(args);
		if(in!=null){
			in.close();
		}
		pw.flush();
		pw.close();
	}

	public static void solution(String[] args) throws Exception{
		long L = nextLong();
		long R = nextLong();
		HashMap<Integer,Integer> map = new HashMap<>();
		for(int i=0;i<=2019;i++){
			map.put(i, i);
		}
		long ans =2019;
		for(long i=L;i<R;i++){
			HashMap<Integer,Integer> tmp = new HashMap<>();
			for(long k=i+1;k<=R;k++){
				int x = (int)((i%2019)*(k%2019))%2019;
				ans = Math.min(ans, x);
				if(tmp.containsKey(x)){
					break;
				}
				tmp.put(x, x);
			}
			for(int x:tmp.keySet()){
				map.remove(x);
			}
			if(ans==0||map.size()==0){
				break;
			}
		}
		pw.println(ans);

	}

	public static void dfs(int n,int cnt,ArrayList<Integer>[] tree,int parent,int[] set){
		if(n!=parent&&tree[n].size()==1){
			set[n]=cnt;
			return;
		}
		for(int x:tree[n]){
			if(x==parent){
				continue;
			}
			dfs(x,cnt+1,tree,n,set);
		}
	}


	public static void check() throws Exception{
		if(in == null){
			in = new BufferedReader(new InputStreamReader(System.in));
		}
		if(Ws==null || Ws.length<=wsIndx){
			Ws = in.readLine().split(" ");
			wsIndx=0;
		}
	}
	public static int nextInt()throws Exception{
		check();
		return Integer.parseInt(Ws[wsIndx++]);
	}

	public static long nextLong()throws Exception{
		check();
		return Long.parseLong(Ws[wsIndx++]);
	}

	public static String nextString()throws Exception{
		check();
		return Ws[wsIndx++];
	}

	public static int[] nextInts()throws Exception{
		check();
		int[] tmp = new int[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Integer.parseInt(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static long[] nextLongs()throws Exception{
		check();
		long[] tmp = new long[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Long.parseLong(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static String[] nextStrings()throws Exception{
		check();
		wsIndx=Ws.length;
		return Ws;
	}

} Main
import java.io.*;
import java.util.*;

public class Main {

	final static long MOD = 1000000007;
	public static String[] Ws = null;
	public static int wsIndx = 0;
	public static BufferedReader in = null;
	public static long cnt=0;
	public static PrintWriter pw = new PrintWriter(System.out);
	public static void main(String[] args) throws Exception {
		solution(args);
		if(in!=null){
			in.close();
		}
		pw.flush();
		pw.close();
	}

	public static void solution(String[] args) throws Exception{
		long L = nextLong();
		long R = nextLong();
		HashMap<Integer,Integer> map = new HashMap<>();
		for(int i=0;i<=2019;i++){
			map.put(i, i);
		}
		long ans =2019;
		for(long i=L;i<R;i++){
			HashMap<Integer,Integer> tmp = new HashMap<>();
			for(long k=i+1;k<=R;k++){
				int x = (int)((i%2019)*(k%2019))%2019;
				ans = Math.min(ans, x);
				if(tmp.containsKey(x)){
					break;
				}
				tmp.put(x, x);
			}
			for(int x:tmp.keySet()){
				map.remove(x);
			}
			if(ans==0||map.size()==0){
				break;
			}
		}
		pw.println(ans);

	}

	public static void dfs(int n,int cnt,ArrayList<Integer>[] tree,int parent,int[] set){
		if(n!=parent&&tree[n].size()==1){
			set[n]=cnt;
			return;
		}
		for(int x:tree[n]){
			if(x==parent){
				continue;
			}
			dfs(x,cnt+1,tree,n,set);
		}
	}


	public static void check() throws Exception{
		if(in == null){
			in = new BufferedReader(new InputStreamReader(System.in));
		}
		if(Ws==null || Ws.length<=wsIndx){
			Ws = in.readLine().split(" ");
			wsIndx=0;
		}
	}
	public static int nextInt()throws Exception{
		check();
		return Integer.parseInt(Ws[wsIndx++]);
	}

	public static long nextLong()throws Exception{
		check();
		return Long.parseLong(Ws[wsIndx++]);
	}

	public static String nextString()throws Exception{
		check();
		return Ws[wsIndx++];
	}

	public static int[] nextInts()throws Exception{
		check();
		int[] tmp = new int[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Integer.parseInt(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static long[] nextLongs()throws Exception{
		check();
		long[] tmp = new long[Ws.length];
		for(int i=0;i<tmp.length;i++){
			tmp[i]=Long.parseLong(Ws[i]);
		}
		wsIndx=Ws.length;
		return tmp;
	}

	public static String[] nextStrings()throws Exception{
		check();
		wsIndx=Ws.length;
		return Ws;
	}

}

