Problem:
Score : 100 points

Problem Statement

Takahashi has K 500-yen coins. (Yen is the currency of Japan.)
If these coins add up to X yen or more, print Yes; otherwise, print No.

Constraints

1 \leq K \leq 100

1 \leq X \leq 10^5

Input

Input is given from Standard Input in the following format:

K X

Output

If the coins add up to X yen or more, print Yes; otherwise, print No.

Sample Input 1

2 900

Sample Output 1

Yes

Two 500-yen coins add up to 1000 yen, which is not less than X = 900 yen.

Sample Input 2

1 501

Sample Output 2

No

One 500-yen coin is worth 500 yen, which is less than X = 501 yen.

Sample Input 3

4 2000

Sample Output 3

Yes

Four 500-yen coins add up to 2000 yen, which is not less than X = 2000 yen.

Solution in C (GCC 5.4.1) (judge verdict: Runtime Error)

#include <stdio.h>
#include <stdlib.h>

int main()
{
	int i, N, P[9], Q[9];
	scanf("%d", &N);
	for (i = 1; i <= N; i++) scanf("%d", &(P[i]));
	for (i = 1; i <= N; i++) scanf("%d", &(Q[i]));
	
	int j, p = 1, q = 1, fact = 1;
	for (i = 1; i <= N - 1; i++) fact *= i;
	for (i = 1; i <= N - 1; i++) {
		p += (P[i] - 1) * fact;
		q += (Q[i] - 1) * fact;
		for (j = i + 1; j <= N; j++) {
			if (P[j] > P[i]) P[j]--;
			if (Q[j] > Q[i]) Q[j]--;
		}
		fact /= N - i;
	}
	
	printf("%d\n", abs(p - q));
	fflush(stdout);
	return 0;
}