





from functools import reduce

UpperCAmelCase_					:   Union[str, Any] 							=						(
    """73167176531330624919225119674426574742355349194934"""
    """96983520312774506326239578318016984801869478851843"""
    """85861560789112949495459501737958331952853208805511"""
    """12540698747158523863050715693290963295227443043557"""
    """66896648950445244523161731856403098711121722383113"""
    """62229893423380308135336276614282806444486645238749"""
    """30358907296290491560440772390713810515859307960866"""
    """70172427121883998797908792274921901699720888093776"""
    """65727333001053367881220235421809751254540594752243"""
    """52584907711670556013604839586446706324415722155397"""
    """53697817977846174064955149290862569321978468622482"""
    """83972241375657056057490261407972968652414535100474"""
    """82166370484403199890008895243450658541227588666881"""
    """16427171479924442928230863465674813919123162824586"""
    """17866458359124566529476545682848912883142607690042"""
    """24219022671055626321111109370544217506941658960408"""
    """07198403850962455444362981230987879927244284909188"""
    """84580156166097919133875499200524063689912560717606"""
    """05886116467109405077541002256983155200055935729725"""
    """71636269561882670428252483600823257530420752963450"""
)






def 							_lowerCAmelCase (  _a   :					str = N			)	->			int:
     return max(
         # mypy cannot properly interpret reduce
         int(reduce(lambda _a					,   _a			: str(int(_a			) * int(_a			)			)					,   n[i : i + 13]			)			)
         for i in range(len(_a			) - 12			)			)


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







import enum
import os
from hashlib import shaaaa
from typing import Optional

from .. import config
from .logging import get_logger


UpperCAmelCase_					:   int 							=						get_logger(__name__)





class      lowercase__    (							enum.Enum  ):
  __UpperCamelCase	     =  """all_checks"""
  __UpperCamelCase	     =  """basic_checks"""
  __UpperCamelCase	     =  """no_checks"""





class      lowercase__    (							__A  ):
  pass





class      lowercase__    (							__A  ):
  pass





class      lowercase__    (							__A  ):
  pass





class      lowercase__    (							__A  ):
  pass






def 							_lowerCAmelCase (  _a   :					Optional[dict]					,   _a   :					dict					,   _a   :					str=None			)	->			Optional[Any]:
     if expected_checksums is None:
          logger.info("""Unable to verify checksums."""			)
          return
     if len(set(_a			) - set(_a			)			) > 0:
          raise ExpectedMoreDownloadedFiles(str(set(_a			) - set(_a			)			)			)
     if len(set(_a			) - set(_a			)			) > 0:
          raise UnexpectedDownloadedFile(str(set(_a			) - set(_a			)			)			)
     lowerCAmelCase_					:       Union[str, Any]    =		[url for url in expected_checksums if expected_checksums[url] != recorded_checksums[url]]
     lowerCAmelCase_					:       Optional[Any]    =		""" for """ + verification_name if verification_name is not None else """"""
     if len(_a			) > 0:
          raise NonMatchingChecksumError(
              F'Checksums didn\'t match{for_verification_name}:\n'
              F'{bad_urls}\n'
              """Set `verification_mode='no_checks'` to skip checksums verification and ignore this error"""			)
     logger.info("""All the checksums matched successfully""" + for_verification_name			)





class      lowercase__    (							__A  ):
  pass





class      lowercase__    (							__A  ):
  pass





class      lowercase__    (							__A  ):
  pass





class      lowercase__    (							__A  ):
  pass






def 							_lowerCAmelCase (  _a   :					Optional[dict]					,   _a   :					dict			)	->			str:
     if expected_splits is None:
          logger.info("""Unable to verify splits sizes."""			)
          return
     if len(set(_a			) - set(_a			)			) > 0:
          raise ExpectedMoreSplits(str(set(_a			) - set(_a			)			)			)
     if len(set(_a			) - set(_a			)			) > 0:
          raise UnexpectedSplits(str(set(_a			) - set(_a			)			)			)
     lowerCAmelCase_					:       Optional[int]    =		[
         {"""expected""": expected_splits[name], """recorded""": recorded_splits[name]}
         for name in expected_splits
         if expected_splits[name].num_examples != recorded_splits[name].num_examples
     ]
     if len(_a			) > 0:
          raise NonMatchingSplitsSizesError(str(_a			)			)
     logger.info("""All the splits matched successfully."""			)






def 							_lowerCAmelCase (  _a   :					str					,   _a   :					bool = True			)	->			dict:
     if record_checksum:
          lowerCAmelCase_					:       int    =		shaaaa()
          with open(_a					,   """rb"""			) as f:
               for chunk in iter(lambda: f.read(1 << 20			)					,   B""""""			):
                    m.update(_a			)
               lowerCAmelCase_					:       List[str]    =		m.hexdigest()
     else:
          lowerCAmelCase_					:       Union[str, Any]    =		None
     return {"num_bytes": os.path.getsize(_a			), "checksum": checksum}







def 							_lowerCAmelCase (  _a   :					Tuple			)	->			Optional[int]:
     if dataset_size and config.IN_MEMORY_MAX_SIZE:
          return dataset_size < config.IN_MEMORY_MAX_SIZE
     else:
          return False
