import argparse
import datetime






def        __UpperCAmelCase    (       UpperCAmelCase       )->       str:



			"""simple docstring"""







			lowercase							=		{
			    '''0''': '''Sunday''',
			    '''1''': '''Monday''',
			    '''2''': '''Tuesday''',
			    '''3''': '''Wednesday''',
			    '''4''': '''Thursday''',
			    '''5''': '''Friday''',
			    '''6''': '''Saturday''',
			}

			lowercase							=		{0: 1, 1: 2, 2: 3, 3: 4, 4: 5, 5: 6, 6: 0}

			# Validate
			if not 0 < len(UpperCAmelCase       ) < 11:
						raise ValueError('''Must be 10 characters long'''       )

			# Get month
			lowercase							=		int(date_input[0] + date_input[1]       )
			# Validate
			if not 0 < m < 13:
						raise ValueError('''Month must be between 1 - 12'''       )

			lowercase							=		date_input[2]
			# Validate
			if sep_a not in ["-", "/"]:
						raise ValueError('''Date separator must be \'-\' or \'/\''''       )

			# Get day
			lowercase							=		int(date_input[3] + date_input[4]       )
			# Validate
			if not 0 < d < 32:
						raise ValueError('''Date must be between 1 - 31'''       )

			# Get second separator
			lowercase							=		date_input[5]
			# Validate
			if sep_a not in ["-", "/"]:
						raise ValueError('''Date separator must be \'-\' or \'/\''''       )

			# Get year
			lowercase							=		int(date_input[6] + date_input[7] + date_input[8] + date_input[9]       )
			# Arbitrary year range
			if not 45 < y < 8500:
						raise ValueError(
						    '''Year out of range. There has to be some sort of limit...right?'''       )

			# Get datetime obj for validation
			lowercase							=		datetime.date(int(UpperCAmelCase       ),		int(UpperCAmelCase       ),		int(UpperCAmelCase       )       )

			# Start math
			if m <= 2:
						lowercase							=		y - 1
						lowercase							=		m + 12
			# maths var
			lowercase							=		int(str(UpperCAmelCase       )[:2]       )
			lowercase							=		int(str(UpperCAmelCase       )[2:]       )
			lowercase							=		int(2.6 * m - 5.39       )
			lowercase							=		int(c / 4       )
			lowercase							=		int(k / 4       )
			lowercase							=		int(d + k       )
			lowercase							=		int(t + u + v + x       )
			lowercase							=		int(z - (2 * c)       )
			lowercase							=		round(w % 7       )
			# End math

			# Validate math
			if f != convert_datetime_days[dt_ck.weekday()]:
						raise AssertionError('''The date was evaluated incorrectly. Contact developer.'''       )

			# Response
			lowercase							=		f'Your date {date_input}, is a {days[str(UpperCAmelCase       )]}!'
			return response


if __name__ == "__main__":
						import doctest

						doctest.testmod()
						A_      =      argparse.ArgumentParser(
						    description=(
						        "Find out what day of the week nearly any date is or was. Enter "
						        "date as a string in the mm-dd-yyyy or mm/dd/yyyy format"
						    )
						)
						parser.add_argument(
						    "date_input", type=str, help="Date as a string (mm-dd-yyyy or mm/dd/yyyy)"
						)
						A_      =      parser.parse_args()
						zeller(args.date_input)






from __future__ import annotations

from fractions import Fraction
from math import gcd, sqrt






def        __UpperCAmelCase    (       UpperCAmelCase       )->       bool:



			"""simple docstring"""







			lowercase							=		int(number**0.5       )
			return number == sq * sq






def        __UpperCAmelCase    (       UpperCAmelCase,		UpperCAmelCase,		UpperCAmelCase,		UpperCAmelCase,		UpperCAmelCase,		UpperCAmelCase       )->       tuple[int, int]:



			"""simple docstring"""







			lowercase							=		x_num * y_den * z_den + y_num * x_den * z_den + z_num * x_den * y_den
			lowercase							=		x_den * y_den * z_den
			lowercase							=		gcd(UpperCAmelCase,		UpperCAmelCase       )
			top //= hcf
			bottom //= hcf
			return top, bottom






def        __UpperCAmelCase    (       UpperCAmelCase = 35       )->       int:



			"""simple docstring"""







			lowercase							=		set()
			lowercase							=		42
			lowercase							=		Fraction(0       )
			lowercase							=		42

			for x_num in range(1,		order + 1       ):
						for x_den in range(x_num + 1,		order + 1       ):
									for y_num in range(1,		order + 1       ):
												for y_den in range(y_num + 1,		order + 1       ):
															# n=1
															lowercase							=		x_num * y_den + x_den * y_num
															lowercase							=		x_den * y_den
															lowercase							=		gcd(UpperCAmelCase,		UpperCAmelCase       )
															z_num //= hcf
															z_den //= hcf
															if 0 < z_num < z_den <= order:
																		lowercase							=		add_three(
																		    UpperCAmelCase,		UpperCAmelCase,		UpperCAmelCase,		UpperCAmelCase,		UpperCAmelCase,		UpperCAmelCase       )
																		unique_s.add(UpperCAmelCase       )

															# n=2
															lowercase							=		(
															    x_num * x_num * y_den * y_den + x_den * x_den * y_num * y_num
															)
															lowercase							=		x_den * x_den * y_den * y_den
															if is_sq(UpperCAmelCase       ) and is_sq(UpperCAmelCase       ):
																		lowercase							=		int(sqrt(UpperCAmelCase       )       )
																		lowercase							=		int(sqrt(UpperCAmelCase       )       )
																		lowercase							=		gcd(UpperCAmelCase,		UpperCAmelCase       )
																		z_num //= hcf
																		z_den //= hcf
																		if 0 < z_num < z_den <= order:
																					lowercase							=		add_three(
																					    UpperCAmelCase,		UpperCAmelCase,		UpperCAmelCase,		UpperCAmelCase,		UpperCAmelCase,		UpperCAmelCase       )
																					unique_s.add(UpperCAmelCase       )

                    # n=-1
															lowercase							=		x_num * y_num
															lowercase							=		x_den * y_num + x_num * y_den
															lowercase							=		gcd(UpperCAmelCase,		UpperCAmelCase       )
															z_num //= hcf
															z_den //= hcf
															if 0 < z_num < z_den <= order:
																		lowercase							=		add_three(
																		    UpperCAmelCase,		UpperCAmelCase,		UpperCAmelCase,		UpperCAmelCase,		UpperCAmelCase,		UpperCAmelCase       )
																		unique_s.add(UpperCAmelCase       )

															# n=2
															lowercase							=		x_num * x_num * y_num * y_num
															lowercase							=		(
															    x_den * x_den * y_num * y_num + x_num * x_num * y_den * y_den
															)
															if is_sq(UpperCAmelCase       ) and is_sq(UpperCAmelCase       ):
																		lowercase							=		int(sqrt(UpperCAmelCase       )       )
																		lowercase							=		int(sqrt(UpperCAmelCase       )       )
																		lowercase							=		gcd(UpperCAmelCase,		UpperCAmelCase       )
																		z_num //= hcf
																		z_den //= hcf
																		if 0 < z_num < z_den <= order:
																					lowercase							=		add_three(
																					    UpperCAmelCase,		UpperCAmelCase,		UpperCAmelCase,		UpperCAmelCase,		UpperCAmelCase,		UpperCAmelCase       )
																					unique_s.add(UpperCAmelCase       )

			for num, den in unique_s:
						total += Fraction(UpperCAmelCase,		UpperCAmelCase       )

			return total.denominator + total.numerator


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





