output_description: Print the number of integers between A and B (inclusive) that can be evenly
  divided by neither C nor D.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      A B C D
attempt: import fractions
  
  a, b, c, d = map(int, input().split())
  yoso = b - a + 1
  kobai = fractions.gcd(c, d)
  AC = c - (a % c)
  if AC == c:
      AC = 0
  BC = b % c
  AD = d - (a % d)
  if AD == d:
      AD = 0
  BD = b % d
  Akobai = a % kobai
  if Akobai == kobai:
      Akobai = 0
  Bkobai = b % kobai
  C = 0
  if AC + BC >= (yoso % c):
      C = yoso // c
  else:
      C = (yoso // c) + 1
  D = 0
  if AD + BD >= (yoso % d):
      D = yoso // d
  else:
      D = (yoso // d) + 1
  CD = 0
  if Akobai + Bkobai >= (yoso % kobai):
      CD = yoso // kobai
  else:
      CD = (yoso // kobai) + 1
  print(yoso + CD - C - D)
  
problem_description: Statement
  
  You are given four integers A, B, C, and D. Find the number of integers
  between A and B (inclusive) that can be evenly divided by neither C nor D.
samples: [{"input": "4 9 2 3", "output": "2\n    \n\n5 and 7 satisfy the condition.\n\n* * *"}, {"input": "10 40 6 8", "output": "23\n    \n\n* * *"}, {"input": "314159265358979323 846264338327950288 419716939 937510582", "output": "532105071133627368"}]