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.BufferedOutputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.math.BigInteger;
import java.util.StringTokenizer;

public class HackingCypher {
    private void solve() {
        char[] _pubkey = in.next().toCharArray();
        if (_pubkey.length == 1) {
            out.println("NO");
            return;
        }
        int[] pubkey = new int[_pubkey.length];
        for (int i = 0; i < _pubkey.length; ++i) {
            pubkey[i] = _pubkey[i] - '0';
        }
        int a = in.nextInt(), b = in.nextInt();
        int arem = pubkey[0] % a, brem = 0;
        for (int i = 1; i < pubkey.length; ++i) {
            brem = (brem * 10 + pubkey[i]) % b;
        }
        if (arem == 0 && brem == 0 && pubkey[1] != 0) {
            out.println("YES");
            out.println(new String(_pubkey, 0, 1));
            out.println(new String(_pubkey, 1, _pubkey.length - 1));
            return;
        }
        int[] brem10s = new int[pubkey.length + 10];
        brem10s[0] = 1;
        for (int i = 1; i < brem10s.length; ++i) {
            brem10s[i] = (brem10s[i - 1] * 10) % b;
        }

        for (int i = 1; i < pubkey.length - 1; ++i) {
            arem = (arem * 10 + pubkey[i]) % a;
            brem = (brem - pubkey[i] * brem10s[pubkey.length - i - 1]) % b;
            brem = (brem + b) % b;
            if (arem == 0 && brem == 0 && pubkey[i + 1] != 0) {
                out.println("YES");
                out.println(new String(_pubkey, 0, i + 1));
                out.println(new String(_pubkey, i + 1, _pubkey.length - (i + 1)));
                return;
            }
        }
        out.println("NO");
    }

    private static class Pow {
        public static final int BIGPRIME7 = 1000000007;
        public static final int BIGPRIME9 = 1000000009;

        /**
         *
         * @param base base in an exponentiation expression
         * @param exponent exponent in an exponentiation expression
         * @param mod mod
         * @return the remainder of _base**_exponent when divided with _mod
         */
        public static BigInteger pow(BigInteger base, BigInteger exponent, BigInteger mod) {
            if (base == null)
                throw new NullPointerException("argument 'base' can't be null");
            if (exponent == null)
                throw new NullPointerException("argument 'exponent' can't be null");
            if (mod == null)
                throw new NullPointerException("argument 'mod' can't be null");
            if (mod.compareTo(BigInteger.ZERO) <= 0)
                throw new IllegalArgumentException("argument 'mod' must be greater than 0");
            BigInteger TWO = BigInteger.valueOf(2);
            BigInteger answer = BigInteger.ONE;
            while (exponent.compareTo(BigInteger.ZERO) > 0) {
                if (exponent.remainder(TWO).compareTo(BigInteger.ZERO) != 0)
                    answer = answer.multiply(base).remainder(mod);
                base = base.multiply(base).remainder(mod);
                exponent = exponent.divide(TWO);
            }
            return answer.mod(mod);
        }

        /**
         *
         * the data types of each parameter should exactly be same for the algorithm to be correct.
         *
         * time complexity     : O(log(_exponent))
         * space complexity    : O(1)
         *
         * @param _base base in an exponentiation expression
         * @param _exponent exponent in an exponentiation expression
         * @param _mod mod
         * @return the remainder of _base**_exponent when divided with _mod
         */
        public static long pow(final int _base, final long _exponent, final int _mod) {
            long base = _base;
            long exponent = _exponent;
            long answer = 1;
            while (exponent > 0) {
                if (exponent % 2 != 0)
                    answer = (answer * base) % (long) _mod;
                base = (base * base) % (long) _mod;
                exponent /= 2;
            }
            return answer % (long) _mod;
        }

        public static long pow(final long _base, final long _exponent, final long _mod) {
            long base = _base;
            long exponent = _exponent;
            long answer = 1;
            while (exponent > 0) {
                if (exponent % 2 != 0)
                    answer = (answer * base) % _mod;
                base = (base * base) % _mod;
                exponent /= 2;
            }
            return answer % _mod;
        }


        public static long pow(final long _base, final long _exponent) {
            long base = _base;
            long exponent = _exponent;
            long answer = 1;
            while (exponent > 0) {
                if (exponent % 2 != 0)
                    answer = (answer * base);
                base = (base * base);
                exponent /= 2;
            }
            return answer;
        }

        public static long invmod(final int _base, final int _mod) {
            if (_mod != BIGPRIME7 && _mod != BIGPRIME9)
                throw new RuntimeException("if you are sure that this is a prime, " +
                        "then add it to Pow class or use invprimemod");
            return pow(_base, _mod - 2, _mod) % _mod;
        }

        public static long invprimemod(final int _base, final int _mod) {
            return pow(_base, _mod - 2, _mod);
        }
    }


    private class FastScanner {
        BufferedReader br;
        StringTokenizer st;

        FastScanner() {
            br = new BufferedReader(new InputStreamReader(System.in), 327680);
            st = new StringTokenizer("");
        }

        String next() {
            while (!st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return st.nextToken();
        }

        char nextChar() {
            String s = next();
            if (s.length() > 1)
                throw new RuntimeException("character expected but string provided");
            return s.charAt(0);
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }
        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String str = "";
            try {
                str = br.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            return str;
        }
    }

    private FastScanner in;
    private PrintWriter out;

    private void run() {
        try {
            in = new FastScanner();
            out = new PrintWriter(new BufferedOutputStream(System.out));
            solve();
        } finally {
            out.close();
        }
    }

    public static void main(String[] arg) {
        new HackingCypher().run();
    }
}

