1524: 2019

内存限制:128 MB 时间限制:1.000 S
评测方式:文本比较 命题人:
提交:22 解决:4

题目描述

Given a, b, c, d, find out the number of pairs of integers (x, y) where a≤x≤b,c≤y≤d and xy is a multiple of 2019.
* 1<=a<=b<=109 ,1<=c<=d<=109 .
* The number of tests cases does not exceed 104

输入

The input consists of several test cases and is terminated by end-of-file.
Each test case contains four integers a, b, c, d.

输出

For each test case, print an integer which denotes the result.

样例输入 复制

1 2 1 2019

样例输出 复制

2