For this Question: While doing homework, Nobita stuck on a problem and asks for your help. 
Problem statement:-
Given three integers X, Y, and N. Your task is to check if it is possible to form N by using only combinations of X and Y.
i.e check if there exist any P and Q such that P*X + Q*Y = N

Note:- P and Q can be negativeThe input contains only three integers X, Y, and N.

Constraints:-
1 <= X, Y, N <= 100000Print "YES" if it is possible to form N else print "NO".Sample Input:-
3 5 18

Sample Output:-
YES

Explanation:-
1 * 3 + 3 * 5 = 18 (P = 1, Q = 3)

Sample Input:-
4 8 15

Sample Output:-
NO, I have written this Solution Code: import java.io.*;
import java.util.*;



class Main {
	public static void main (String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String input[] = br.readLine().trim().split(" ");

		int x = Integer.parseInt(input[0]),
			y = Integer.parseInt(input[1]),
			n = Integer.parseInt(input[2]);
		boolean flag = false;
		for(int q = 1; q <= 100000; q++) {
			if((n - (q * y)) % x == 0) {
				System.out.println("YES");
				flag = true;
				break;
			}
		}
		if(!flag)
			System.out.println("NO");
	}
}, In this Programming Language: Java, Now tell me if this Code is compilable or not?