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

public class Main {
	public static void main (String[] args) { new Main(); }

	public Main() {
		FastScanner fs = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		System.err.println("");

		int h1 = fs.nextInt(), s1 = fs.nextInt();
		int h2 = fs.nextInt(), s2 = fs.nextInt();
		
		boolean wins = false;
		while(h1 > 0 && h2 > 0) {
			h2 -= s1;
			if(h2 <= 0) {
				wins = true;
				break;
			}
			h1 -= s2;
		}
		
		if(wins) out.println("Yes");
		else out.println("No");
		
		out.close();
	}

	class FastScanner {
		public int BS = 1<<16;
		public char NC = (char)0;
		byte[] buf = new byte[BS];
		int bId = 0, size = 0;
		char c = NC;
		double num = 1;
		BufferedInputStream in;

		public FastScanner() {
			in = new BufferedInputStream(System.in, BS);
		}

		public FastScanner(String s) {
			try {
				in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
			}
			catch (Exception e) {
				in = new BufferedInputStream(System.in, BS);
			}
		}

		public char nextChar(){
			while(bId==size) {
				try {
					size = in.read(buf);
				}catch(Exception e) {
					return NC;
				}                
				if(size==-1)return NC;
				bId=0;
			}
			return (char)buf[bId++];
		}

		public int nextInt() {
			return (int)nextLong();
		}

		public long nextLong() {
			num=1;
			boolean neg = false;
			if(c==NC)c=nextChar();
			for(;(c<'0' || c>'9'); c = nextChar()) {
				if(c=='-')neg=true;
			}
			long res = 0;
			for(; c>='0' && c <='9'; c=nextChar()) {
				res = (res<<3)+(res<<1)+c-'0';
				num*=10;
			}
			return neg?-res:res;
		}

		public double nextDouble() {
			double cur = nextLong();
			return c!='.' ? cur:cur+nextLong()/num;
		}

		public String next() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c>32) {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public String nextLine() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c!='\n') {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public boolean hasNext() {
			if(c>32)return true;
			while(true) {
				c=nextChar();
				if(c==NC)return false;
				else if(c>32)return true;
			}
		}
		
		public int[] nextIntArray(int n) {
			int[] res = new int[n];
			for(int i = 0; i < n; i++) res[i] = nextInt();
			return res;
		}
		
	}

} import java.io.*; io.* java import java.util.*; util.* java public class Main {
	public static void main (String[] args) { new Main(); }

	public Main() {
		FastScanner fs = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		System.err.println("");

		int h1 = fs.nextInt(), s1 = fs.nextInt();
		int h2 = fs.nextInt(), s2 = fs.nextInt();
		
		boolean wins = false;
		while(h1 > 0 && h2 > 0) {
			h2 -= s1;
			if(h2 <= 0) {
				wins = true;
				break;
			}
			h1 -= s2;
		}
		
		if(wins) out.println("Yes");
		else out.println("No");
		
		out.close();
	}

	class FastScanner {
		public int BS = 1<<16;
		public char NC = (char)0;
		byte[] buf = new byte[BS];
		int bId = 0, size = 0;
		char c = NC;
		double num = 1;
		BufferedInputStream in;

		public FastScanner() {
			in = new BufferedInputStream(System.in, BS);
		}

		public FastScanner(String s) {
			try {
				in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
			}
			catch (Exception e) {
				in = new BufferedInputStream(System.in, BS);
			}
		}

		public char nextChar(){
			while(bId==size) {
				try {
					size = in.read(buf);
				}catch(Exception e) {
					return NC;
				}                
				if(size==-1)return NC;
				bId=0;
			}
			return (char)buf[bId++];
		}

		public int nextInt() {
			return (int)nextLong();
		}

		public long nextLong() {
			num=1;
			boolean neg = false;
			if(c==NC)c=nextChar();
			for(;(c<'0' || c>'9'); c = nextChar()) {
				if(c=='-')neg=true;
			}
			long res = 0;
			for(; c>='0' && c <='9'; c=nextChar()) {
				res = (res<<3)+(res<<1)+c-'0';
				num*=10;
			}
			return neg?-res:res;
		}

		public double nextDouble() {
			double cur = nextLong();
			return c!='.' ? cur:cur+nextLong()/num;
		}

		public String next() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c>32) {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public String nextLine() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c!='\n') {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public boolean hasNext() {
			if(c>32)return true;
			while(true) {
				c=nextChar();
				if(c==NC)return false;
				else if(c>32)return true;
			}
		}
		
		public int[] nextIntArray(int n) {
			int[] res = new int[n];
			for(int i = 0; i < n; i++) res[i] = nextInt();
			return res;
		}
		
	}

} Main public static void main (String[] args) { new Main(); } main { new Main(); } new Main() String[] args args public Main() {
		FastScanner fs = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		System.err.println("");

		int h1 = fs.nextInt(), s1 = fs.nextInt();
		int h2 = fs.nextInt(), s2 = fs.nextInt();
		
		boolean wins = false;
		while(h1 > 0 && h2 > 0) {
			h2 -= s1;
			if(h2 <= 0) {
				wins = true;
				break;
			}
			h1 -= s2;
		}
		
		if(wins) out.println("Yes");
		else out.println("No");
		
		out.close();
	} Main {
		FastScanner fs = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		System.err.println("");

		int h1 = fs.nextInt(), s1 = fs.nextInt();
		int h2 = fs.nextInt(), s2 = fs.nextInt();
		
		boolean wins = false;
		while(h1 > 0 && h2 > 0) {
			h2 -= s1;
			if(h2 <= 0) {
				wins = true;
				break;
			}
			h1 -= s2;
		}
		
		if(wins) out.println("Yes");
		else out.println("No");
		
		out.close();
	} FastScanner fs = new FastScanner(); fs new FastScanner() PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) System.err.println("") System.err.println System.err System System.err "" int h1 = fs.nextInt() h1 fs.nextInt() fs.nextInt fs s1 = fs.nextInt(); s1 fs.nextInt() fs.nextInt fs int h2 = fs.nextInt() h2 fs.nextInt() fs.nextInt fs s2 = fs.nextInt(); s2 fs.nextInt() fs.nextInt fs boolean wins = false; wins false while(h1 > 0 && h2 > 0) {
			h2 -= s1;
			if(h2 <= 0) {
				wins = true;
				break;
			}
			h1 -= s2;
		} h1 > 0 && h2 > 0 h1 > 0 h1 0 h2 > 0 h2 0 {
			h2 -= s1;
			if(h2 <= 0) {
				wins = true;
				break;
			}
			h1 -= s2;
		} h2 -= s1 h2 s1 if(h2 <= 0) {
				wins = true;
				break;
			} h2 <= 0 h2 0 {
				wins = true;
				break;
			} wins = true wins true break; h1 -= s2 h1 s2 if(wins) out.println("Yes");
		else out.println("No"); wins out.println("Yes") out.println out "Yes" out.println("No") out.println out "No" out.close() out.close out class FastScanner {
		public int BS = 1<<16;
		public char NC = (char)0;
		byte[] buf = new byte[BS];
		int bId = 0, size = 0;
		char c = NC;
		double num = 1;
		BufferedInputStream in;

		public FastScanner() {
			in = new BufferedInputStream(System.in, BS);
		}

		public FastScanner(String s) {
			try {
				in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
			}
			catch (Exception e) {
				in = new BufferedInputStream(System.in, BS);
			}
		}

		public char nextChar(){
			while(bId==size) {
				try {
					size = in.read(buf);
				}catch(Exception e) {
					return NC;
				}                
				if(size==-1)return NC;
				bId=0;
			}
			return (char)buf[bId++];
		}

		public int nextInt() {
			return (int)nextLong();
		}

		public long nextLong() {
			num=1;
			boolean neg = false;
			if(c==NC)c=nextChar();
			for(;(c<'0' || c>'9'); c = nextChar()) {
				if(c=='-')neg=true;
			}
			long res = 0;
			for(; c>='0' && c <='9'; c=nextChar()) {
				res = (res<<3)+(res<<1)+c-'0';
				num*=10;
			}
			return neg?-res:res;
		}

		public double nextDouble() {
			double cur = nextLong();
			return c!='.' ? cur:cur+nextLong()/num;
		}

		public String next() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c>32) {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public String nextLine() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c!='\n') {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public boolean hasNext() {
			if(c>32)return true;
			while(true) {
				c=nextChar();
				if(c==NC)return false;
				else if(c>32)return true;
			}
		}
		
		public int[] nextIntArray(int n) {
			int[] res = new int[n];
			for(int i = 0; i < n; i++) res[i] = nextInt();
			return res;
		}
		
	} FastScanner public int BS = 1<<16; BS 1<<16 1 16 public char NC = (char)0; NC (char)0 byte[] buf = new byte[BS]; buf new byte[BS] BS int bId = 0 bId 0 size = 0; size 0 char c = NC; c NC double num = 1; num 1 BufferedInputStream in; in public FastScanner() {
			in = new BufferedInputStream(System.in, BS);
		} FastScanner {
			in = new BufferedInputStream(System.in, BS);
		} in = new BufferedInputStream(System.in, BS) in new BufferedInputStream(System.in, BS) public FastScanner(String s) {
			try {
				in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
			}
			catch (Exception e) {
				in = new BufferedInputStream(System.in, BS);
			}
		} FastScanner {
			try {
				in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
			}
			catch (Exception e) {
				in = new BufferedInputStream(System.in, BS);
			}
		} try {
				in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
			}
			catch (Exception e) {
				in = new BufferedInputStream(System.in, BS);
			} catch (Exception e) {
				in = new BufferedInputStream(System.in, BS);
			} Exception e {
				in = new BufferedInputStream(System.in, BS);
			} in = new BufferedInputStream(System.in, BS) in new BufferedInputStream(System.in, BS) {
				in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
			} in = new BufferedInputStream(new FileInputStream(new File(s)), BS) in new BufferedInputStream(new FileInputStream(new File(s)), BS) String s s public char nextChar(){
			while(bId==size) {
				try {
					size = in.read(buf);
				}catch(Exception e) {
					return NC;
				}                
				if(size==-1)return NC;
				bId=0;
			}
			return (char)buf[bId++];
		} nextChar {
			while(bId==size) {
				try {
					size = in.read(buf);
				}catch(Exception e) {
					return NC;
				}                
				if(size==-1)return NC;
				bId=0;
			}
			return (char)buf[bId++];
		} while(bId==size) {
				try {
					size = in.read(buf);
				}catch(Exception e) {
					return NC;
				}                
				if(size==-1)return NC;
				bId=0;
			} bId==size bId size {
				try {
					size = in.read(buf);
				}catch(Exception e) {
					return NC;
				}                
				if(size==-1)return NC;
				bId=0;
			} try {
					size = in.read(buf);
				}catch(Exception e) {
					return NC;
				} catch(Exception e) {
					return NC;
				} Exception e {
					return NC;
				} return NC; NC {
					size = in.read(buf);
				} size = in.read(buf) size in.read(buf) in.read in buf if(size==-1)return NC; size==-1 size -1 1 return NC; NC bId=0 bId 0 return (char)buf[bId++]; (char)buf[bId++] buf bId++ bId public int nextInt() {
			return (int)nextLong();
		} nextInt {
			return (int)nextLong();
		} return (int)nextLong(); (int)nextLong() nextLong public long nextLong() {
			num=1;
			boolean neg = false;
			if(c==NC)c=nextChar();
			for(;(c<'0' || c>'9'); c = nextChar()) {
				if(c=='-')neg=true;
			}
			long res = 0;
			for(; c>='0' && c <='9'; c=nextChar()) {
				res = (res<<3)+(res<<1)+c-'0';
				num*=10;
			}
			return neg?-res:res;
		} nextLong {
			num=1;
			boolean neg = false;
			if(c==NC)c=nextChar();
			for(;(c<'0' || c>'9'); c = nextChar()) {
				if(c=='-')neg=true;
			}
			long res = 0;
			for(; c>='0' && c <='9'; c=nextChar()) {
				res = (res<<3)+(res<<1)+c-'0';
				num*=10;
			}
			return neg?-res:res;
		} num=1 num 1 boolean neg = false; neg false if(c==NC)c=nextChar(); c==NC c NC c=nextChar() c nextChar() nextChar for(;(c<'0' || c>'9'); c = nextChar()) {
				if(c=='-')neg=true;
			} ; (c<'0' || c>'9') c<'0' c '0' c>'9' c '9' c = nextChar() c = nextChar() c nextChar() nextChar {
				if(c=='-')neg=true;
			} {
				if(c=='-')neg=true;
			} if(c=='-')neg=true; c=='-' c '-' neg=true neg true long res = 0; res 0 for(; c>='0' && c <='9'; c=nextChar()) {
				res = (res<<3)+(res<<1)+c-'0';
				num*=10;
			} ; c>='0' && c <='9' c>='0' c '0' c <='9' c '9' c=nextChar() c=nextChar() c nextChar() nextChar {
				res = (res<<3)+(res<<1)+c-'0';
				num*=10;
			} {
				res = (res<<3)+(res<<1)+c-'0';
				num*=10;
			} res = (res<<3)+(res<<1)+c-'0' res (res<<3)+(res<<1)+c-'0' (res<<3)+(res<<1)+c (res<<3)+(res<<1)+c (res<<3) res 3 (res<<1) res 1 c '0' num*=10 num 10 return neg?-res:res; neg?-res:res neg -res res res public double nextDouble() {
			double cur = nextLong();
			return c!='.' ? cur:cur+nextLong()/num;
		} nextDouble {
			double cur = nextLong();
			return c!='.' ? cur:cur+nextLong()/num;
		} double cur = nextLong(); cur nextLong() nextLong return c!='.' ? cur:cur+nextLong()/num; c!='.' ? cur:cur+nextLong()/num c!='.' c '.' cur cur+nextLong()/num cur nextLong()/num nextLong() nextLong num public String next() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c>32) {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		} next {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c>32) {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		} StringBuilder res = new StringBuilder(); res new StringBuilder() while(c<=32)c=nextChar(); c<=32 c 32 c=nextChar() c nextChar() nextChar while(c>32) {
				res.append(c);
				c=nextChar();
			} c>32 c 32 {
				res.append(c);
				c=nextChar();
			} res.append(c) res.append res c c=nextChar() c nextChar() nextChar return res.toString(); res.toString() res.toString res public String nextLine() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c!='\n') {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		} nextLine {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c!='\n') {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		} StringBuilder res = new StringBuilder(); res new StringBuilder() while(c<=32)c=nextChar(); c<=32 c 32 c=nextChar() c nextChar() nextChar while(c!='\n') {
				res.append(c);
				c=nextChar();
			} c!='\n' c '\n' {
				res.append(c);
				c=nextChar();
			} res.append(c) res.append res c c=nextChar() c nextChar() nextChar return res.toString(); res.toString() res.toString res public boolean hasNext() {
			if(c>32)return true;
			while(true) {
				c=nextChar();
				if(c==NC)return false;
				else if(c>32)return true;
			}
		} hasNext {
			if(c>32)return true;
			while(true) {
				c=nextChar();
				if(c==NC)return false;
				else if(c>32)return true;
			}
		} if(c>32)return true; c>32 c 32 return true; true while(true) {
				c=nextChar();
				if(c==NC)return false;
				else if(c>32)return true;
			} true {
				c=nextChar();
				if(c==NC)return false;
				else if(c>32)return true;
			} c=nextChar() c nextChar() nextChar if(c==NC)return false;
				else if(c>32)return true; c==NC c NC return false; false if(c>32)return true; c>32 c 32 return true; true public int[] nextIntArray(int n) {
			int[] res = new int[n];
			for(int i = 0; i < n; i++) res[i] = nextInt();
			return res;
		} nextIntArray {
			int[] res = new int[n];
			for(int i = 0; i < n; i++) res[i] = nextInt();
			return res;
		} int[] res = new int[n]; res new int[n] n for(int i = 0; i < n; i++) res[i] = nextInt(); int i = 0; int i = 0; i 0 i < n i n i++ i++ i res[i] = nextInt(); res[i] = nextInt() res[i] res i nextInt() nextInt return res; res int n n public class Main {
	public static void main (String[] args) { new Main(); }

	public Main() {
		FastScanner fs = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		System.err.println("");

		int h1 = fs.nextInt(), s1 = fs.nextInt();
		int h2 = fs.nextInt(), s2 = fs.nextInt();
		
		boolean wins = false;
		while(h1 > 0 && h2 > 0) {
			h2 -= s1;
			if(h2 <= 0) {
				wins = true;
				break;
			}
			h1 -= s2;
		}
		
		if(wins) out.println("Yes");
		else out.println("No");
		
		out.close();
	}

	class FastScanner {
		public int BS = 1<<16;
		public char NC = (char)0;
		byte[] buf = new byte[BS];
		int bId = 0, size = 0;
		char c = NC;
		double num = 1;
		BufferedInputStream in;

		public FastScanner() {
			in = new BufferedInputStream(System.in, BS);
		}

		public FastScanner(String s) {
			try {
				in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
			}
			catch (Exception e) {
				in = new BufferedInputStream(System.in, BS);
			}
		}

		public char nextChar(){
			while(bId==size) {
				try {
					size = in.read(buf);
				}catch(Exception e) {
					return NC;
				}                
				if(size==-1)return NC;
				bId=0;
			}
			return (char)buf[bId++];
		}

		public int nextInt() {
			return (int)nextLong();
		}

		public long nextLong() {
			num=1;
			boolean neg = false;
			if(c==NC)c=nextChar();
			for(;(c<'0' || c>'9'); c = nextChar()) {
				if(c=='-')neg=true;
			}
			long res = 0;
			for(; c>='0' && c <='9'; c=nextChar()) {
				res = (res<<3)+(res<<1)+c-'0';
				num*=10;
			}
			return neg?-res:res;
		}

		public double nextDouble() {
			double cur = nextLong();
			return c!='.' ? cur:cur+nextLong()/num;
		}

		public String next() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c>32) {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public String nextLine() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c!='\n') {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public boolean hasNext() {
			if(c>32)return true;
			while(true) {
				c=nextChar();
				if(c==NC)return false;
				else if(c>32)return true;
			}
		}
		
		public int[] nextIntArray(int n) {
			int[] res = new int[n];
			for(int i = 0; i < n; i++) res[i] = nextInt();
			return res;
		}
		
	}

} public class Main {
	public static void main (String[] args) { new Main(); }

	public Main() {
		FastScanner fs = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		System.err.println("");

		int h1 = fs.nextInt(), s1 = fs.nextInt();
		int h2 = fs.nextInt(), s2 = fs.nextInt();
		
		boolean wins = false;
		while(h1 > 0 && h2 > 0) {
			h2 -= s1;
			if(h2 <= 0) {
				wins = true;
				break;
			}
			h1 -= s2;
		}
		
		if(wins) out.println("Yes");
		else out.println("No");
		
		out.close();
	}

	class FastScanner {
		public int BS = 1<<16;
		public char NC = (char)0;
		byte[] buf = new byte[BS];
		int bId = 0, size = 0;
		char c = NC;
		double num = 1;
		BufferedInputStream in;

		public FastScanner() {
			in = new BufferedInputStream(System.in, BS);
		}

		public FastScanner(String s) {
			try {
				in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
			}
			catch (Exception e) {
				in = new BufferedInputStream(System.in, BS);
			}
		}

		public char nextChar(){
			while(bId==size) {
				try {
					size = in.read(buf);
				}catch(Exception e) {
					return NC;
				}                
				if(size==-1)return NC;
				bId=0;
			}
			return (char)buf[bId++];
		}

		public int nextInt() {
			return (int)nextLong();
		}

		public long nextLong() {
			num=1;
			boolean neg = false;
			if(c==NC)c=nextChar();
			for(;(c<'0' || c>'9'); c = nextChar()) {
				if(c=='-')neg=true;
			}
			long res = 0;
			for(; c>='0' && c <='9'; c=nextChar()) {
				res = (res<<3)+(res<<1)+c-'0';
				num*=10;
			}
			return neg?-res:res;
		}

		public double nextDouble() {
			double cur = nextLong();
			return c!='.' ? cur:cur+nextLong()/num;
		}

		public String next() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c>32) {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public String nextLine() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c!='\n') {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public boolean hasNext() {
			if(c>32)return true;
			while(true) {
				c=nextChar();
				if(c==NC)return false;
				else if(c>32)return true;
			}
		}
		
		public int[] nextIntArray(int n) {
			int[] res = new int[n];
			for(int i = 0; i < n; i++) res[i] = nextInt();
			return res;
		}
		
	}

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

public class Main {
	public static void main (String[] args) { new Main(); }

	public Main() {
		FastScanner fs = new FastScanner();
		PrintWriter out = new PrintWriter(System.out);
		System.err.println("");

		int h1 = fs.nextInt(), s1 = fs.nextInt();
		int h2 = fs.nextInt(), s2 = fs.nextInt();
		
		boolean wins = false;
		while(h1 > 0 && h2 > 0) {
			h2 -= s1;
			if(h2 <= 0) {
				wins = true;
				break;
			}
			h1 -= s2;
		}
		
		if(wins) out.println("Yes");
		else out.println("No");
		
		out.close();
	}

	class FastScanner {
		public int BS = 1<<16;
		public char NC = (char)0;
		byte[] buf = new byte[BS];
		int bId = 0, size = 0;
		char c = NC;
		double num = 1;
		BufferedInputStream in;

		public FastScanner() {
			in = new BufferedInputStream(System.in, BS);
		}

		public FastScanner(String s) {
			try {
				in = new BufferedInputStream(new FileInputStream(new File(s)), BS);
			}
			catch (Exception e) {
				in = new BufferedInputStream(System.in, BS);
			}
		}

		public char nextChar(){
			while(bId==size) {
				try {
					size = in.read(buf);
				}catch(Exception e) {
					return NC;
				}                
				if(size==-1)return NC;
				bId=0;
			}
			return (char)buf[bId++];
		}

		public int nextInt() {
			return (int)nextLong();
		}

		public long nextLong() {
			num=1;
			boolean neg = false;
			if(c==NC)c=nextChar();
			for(;(c<'0' || c>'9'); c = nextChar()) {
				if(c=='-')neg=true;
			}
			long res = 0;
			for(; c>='0' && c <='9'; c=nextChar()) {
				res = (res<<3)+(res<<1)+c-'0';
				num*=10;
			}
			return neg?-res:res;
		}

		public double nextDouble() {
			double cur = nextLong();
			return c!='.' ? cur:cur+nextLong()/num;
		}

		public String next() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c>32) {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public String nextLine() {
			StringBuilder res = new StringBuilder();
			while(c<=32)c=nextChar();
			while(c!='\n') {
				res.append(c);
				c=nextChar();
			}
			return res.toString();
		}

		public boolean hasNext() {
			if(c>32)return true;
			while(true) {
				c=nextChar();
				if(c==NC)return false;
				else if(c>32)return true;
			}
		}
		
		public int[] nextIntArray(int n) {
			int[] res = new int[n];
			for(int i = 0; i < n; i++) res[i] = nextInt();
			return res;
		}
		
	}

}