Today on Informatics class Nastya learned about GCD and LCM (see links below). Nastya is very intelligent, so she solved all the tasks momentarily and now suggests you to solve one of them as well.

We define a pair of integers (a, b) good, if GCD(a, b) = x and LCM(a, b) = y, where GCD(a, b) denotes the [greatest common divisor](https://en.wikipedia.org/wiki/Greatest_common_divisor) of a and b, and LCM(a, b) denotes the [least common multiple](https://en.wikipedia.org/wiki/Least_common_multiple) of a and b.

You are given two integers x and y. You are to find the number of good pairs of integers (a, b) such that l ≤ a, b ≤ r. Note that pairs (a, b) and (b, a) are considered different if a ≠ b.

Input

The only line contains four integers l, r, x, y (1 ≤ l ≤ r ≤ 109, 1 ≤ x ≤ y ≤ 109).

Output

In the only line print the only integer — the answer for the problem.

Examples

Input

1 2 1 2


Output

2


Input

1 12 1 12


Output

4


Input

50 100 3 30


Output

0

Note

In the first example there are two suitable good pairs of integers (a, b): (1, 2) and (2, 1).

In the second example there are four suitable good pairs of integers (a, b): (1, 12), (12, 1), (3, 4) and (4, 3).

In the third example there are good pairs of integers, for example, (3, 30), but none of them fits the condition l ≤ a, b ≤ r.
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author kessido
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        TaskB solver = new TaskB();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskB {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            long l = in.NextInt();
            long r = in.NextInt();
            long x = in.NextInt();
            long y = in.NextInt();
            ArrayList<Long> dividers = MathExtentions.getAllDividers(y);
            int res = 0;
            for (long a : dividers)
                if (l <= a && a <= r)
                    for (long b : dividers)
                        if (l <= b && b <= r)
                            if (MathExtentions.gcd(a, b) == x && MathExtentions.lcm(a, b) == y)
                                res++;
            out.println(res);

        }

    }

    static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine(), " \t\n\r\f,");
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

        public int NextInt() {
            return Integer.parseInt(next());
        }

    }

    static class MathExtentions {
        public static long gcd(final long a, final long b) {
            if (a == 0)
                return b;
            return gcd(b % a, a);
        }

        public static long lcm(long a, long b) {
            if (a == 0 || b == 0) return 0;
            long gcd = gcd(a, b);
            return (a / gcd) * b;
        }

        public static ArrayList<Long> getAllDividers(long y) {
            //not complete! can use factors
            ArrayList<Long> res = new ArrayList<>();
            long i = 1;
            for (; i * i < y; i++) {
                if (y % i == 0) {
                    res.add(i);
                    res.add(y / i);
                }
            }
            if (i * i == y) res.add(i);
            return res;
        }

    }
}

