






"""simple docstring"""


import math
import os

import cva
import numpy as np

lowercase_								=	255.0



def    lowerCAmelCase							(       __UpperCamelCase						,			__UpperCamelCase					):




  """simple docstring"""







  __A		     =					np.mean((original - contrast) ** 2					)
  if mse == 0:
    return 1_0_0

  return 2_0 * math.logaa(PIXEL_MAX / math.sqrt(__UpperCamelCase					)					)



def    lowerCAmelCase							(       ):




  """simple docstring"""







  __A		     =					os.path.dirname(os.path.realpath(__UpperCamelCase					)					)
  # Loading images (original image and compressed image)
  __A		     =					cva.imread(os.path.join(__UpperCamelCase						,			'''image_data/original_image.png'''					)					)
  __A		     =					cva.imread(os.path.join(__UpperCamelCase						,			'''image_data/compressed_image.png'''					)						,			1					)

  __A		     =					cva.imread(os.path.join(__UpperCamelCase						,			'''image_data/PSNR-example-base.png'''					)					)
  __A		     =					cva.imread(
      os.path.join(__UpperCamelCase						,			'''image_data/PSNR-example-comp-10.jpg'''					)						,			1					)

  # Value expected: 29.73dB
  print('''-- First Test --'''					)
  print(f'PSNR value is {peak_signal_to_noise_ratio(__UpperCamelCase						,			__UpperCamelCase					)} dB'					)

  # # Value expected: 31.53dB (Wikipedia Example)
  print('''\n-- Second Test --'''					)
  print(f'PSNR value is {peak_signal_to_noise_ratio(__UpperCamelCase						,			__UpperCamelCase					)} dB'					)


if __name__ == "__main__":
       main()









"""simple docstring"""






from math import gcd


def 							A__ (     UpperCamelCase__ = 12_000    ):


  '''simple docstring'''


  _SCREAMING_SNAKE_CASE        =			0
  for d in range(max_d + 1    ):
    for n in range(d // 3 + 1       ,							(d + 1) // 2    ):
      if gcd(UpperCamelCase__       ,							UpperCamelCase__    ) == 1:
        fractions_number += 1
  return fractions_number


if __name__ == "__main__":
    print(F'''{solution() = }''')
