Polycarpus participates in a competition for hacking into a new secure messenger. He's almost won.

Having carefully studied the interaction protocol, Polycarpus came to the conclusion that the secret key can be obtained if he properly cuts the public key of the application into two parts. The public key is a long integer which may consist of even a million digits!

Polycarpus needs to find such a way to cut the public key into two nonempty parts, that the first (left) part is divisible by a as a separate number, and the second (right) part is divisible by b as a separate number. Both parts should be positive integers that have no leading zeros. Polycarpus knows values a and b.

Help Polycarpus and find any suitable method to cut the public key.

Input

The first line of the input contains the public key of the messenger — an integer without leading zeroes, its length is in range from 1 to 106 digits. The second line contains a pair of space-separated positive integers a, b (1 ≤ a, b ≤ 108).

Output

In the first line print "YES" (without the quotes), if the method satisfying conditions above exists. In this case, next print two lines — the left and right parts after the cut. These two parts, being concatenated, must be exactly identical to the public key. The left part must be divisible by a, and the right part must be divisible by b. The two parts must be positive integers having no leading zeros. If there are several answers, print any of them.

If there is no answer, print in a single line "NO" (without the quotes).

Examples

Input

116401024
97 1024


Output

YES
11640
1024


Input

284254589153928171911281811000
1009 1000


Output

YES
2842545891539
28171911281811000


Input

120
12 1


Output

NO
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.InputMismatchException;
 
public class C {
	public static ArrayList<Integer> list;
	public static int n;
	public static int[] arr;
	public static int[][] dp;
 
	public static void main(String[] args) throws Exception {
		// TODO Auto-generated method stub
		InputReader s = new InputReader(System.in);
		PrintWriter p = new PrintWriter(System.out);
		String str = s.nextLine();
		long a = s.nextLong();
		long b = s.nextLong();
		long[] arr1 = new long[str.length()];
		long[] arr2 = new long[str.length()];
		long[] arr3 = new long[str.length()];
		arr1[0] = (str.charAt(0) - '0') % a;
		for (int i = 1; i < str.length(); i++) {
			arr1[i] = (arr1[i - 1] * 10 + (str.charAt(i) - '0')) % a;
		}
		arr3[0] = 1 % b;
		for (int i = 1; i < str.length(); i++) {
			arr3[i] = (arr3[i - 1] * 10) % b;
		}
		int j = 1;
		arr2[str.length() - 1] = (str.charAt(str.length() - 1) - '0') % b;
		for (int i = str.length() - 2; i >= 0; i--) {
			long val = str.charAt(i) - '0';
			arr2[i] = (val * (arr3[j]) + arr2[i + 1]) % b;
			j++;
		}
		int flag = 0;
		for (int i = 0; i < str.length() - 1; i++) {
			if(str.charAt(i+1)=='0')
				continue;
			if (arr1[i] == 0 && arr2[i + 1] == 0) {
				flag = 1;
				p.println("YES");
				p.println(str.substring(0, i + 1) + "\n" + str.substring(i + 1));
				break;
			}
		}
		if (flag == 0)
			p.println("NO");
		p.flush();
		p.close();
	}
 
	static class Pair<T, V> {
		T first; // maximum distance Node
		V second; // distance of maximum distance node
 
		// Constructor
		Pair(T first, V second) {
			this.first = first;
			this.second = second;
		}
	}
 
	public static int BinarySearch(long[] a, long k) {
		int n = a.length;
		int i = 0, j = n - 1;
		int mid = 0;
 
		if (k < a[0])
			return 0;
		else if (k >= a[n - 1])
			return n;
		else {
			while (j - i > 1) {
				mid = (i + j) / 2;
 
				if (k >= a[mid])
					i = mid;
				else
					j = mid;
			}
		}
 
		return i + 1;
	}
 
	public static long GCD(long a, long b) {
		if (b == 0)
			return a;
		else
			return GCD(b, a % b);
	}
 
	public static long LCM(long a, long b) {
		return (a * b) / GCD(a, b);
	}
 
	static class InputReader {
 
		private final InputStream stream;
		private final byte[] buf = new byte[8192];
		private int curChar, snumChars;
		private SpaceCharFilter filter;
 
		public InputReader(InputStream stream) {
			this.stream = stream;
		}
 
		public int snext() {
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}
 
		static class pair implements Comparable<pair> {
			Integer x, y;
 
			pair(int x, int y) {
				this.x = x;
				this.y = y;
			}
 
			public int compareTo(pair o) {
				int result = x.compareTo(o.x);
				if (result == 0)
					result = y.compareTo(o.y);
 
				return result;
			}
 
			public String toString() {
				return x + " " + y;
			}
 
			public boolean equals(Object o) {
				if (o instanceof pair) {
					pair p = (pair) o;
					return p.x - x == 0 && p.y - y == 0;
				}
				return false;
			}
 
			public int hashCode() {
				return new Long(x).hashCode() * 31 + new Long(y).hashCode();
			}
		}
 
		public int nextInt() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
 
		public long nextLong() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));
			return res * sgn;
		}
 
		public int[] nextIntArray(int n) {
			int a[] = new int[n];
			for (int i = 0; i < n; i++) {
				a[i] = nextInt();
			}
			return a;
		}
 
		public String readString() {
			int c = snext();
			while (isSpaceChar(c)) {
				c = snext();
			}
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isSpaceChar(c));
			return res.toString();
		}
 
		public String nextLine() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isEndOfLine(c));
			return res.toString();
		}
 
		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}
 
		private boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}
 
		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}
 
	static class CodeX {
		public static void sort(long arr[]) {
			merge_sort(arr, 0, arr.length - 1);
		}
 
		private static void merge_sort(long A[], long start, long end) {
			if (start < end) {
				long mid = (start + end) / 2;
				merge_sort(A, start, mid);
				merge_sort(A, mid + 1, end);
				merge(A, start, mid, end);
			}
 
		}
 
		private static void merge(long A[], long start, long mid, long end) {
			long p = start, q = mid + 1;
			long Arr[] = new long[(int) (end - start + 1)];
			long k = 0;
 
			for (int i = (int) start; i <= end; i++) {
				if (p > mid)
					Arr[(int) k++] = A[(int) q++];
 
				else if (q > end)
					Arr[(int) k++] = A[(int) p++];
 
				else if (A[(int) p] < A[(int) q])
					Arr[(int) k++] = A[(int) p++];
 
				else
					Arr[(int) k++] = A[(int) q++];
			}
			for (int i = 0; i < k; i++) {
				A[(int) start++] = Arr[i];
			}
 
		}
 
	}
 
}