

'''simple docstring'''




import torch
from transformers import PreTrainedModel, XLMRobertaConfig, XLMRobertaModel



class 							lowercase_						(		a			):

  '''simple docstring'''





  __lowerCAmelCase       :			Dict     	= "M-CLIP"
  def __init__(  self ,			a_=1_0_2_4 ,			a_=7_6_8 ,			**a_  )				->					Optional[Any]:


    """simple docstring"""
    UpperCAmelCase    				=						transformerDimSize
    UpperCAmelCase    				=						imageDimSize
    super().__init__(**a_  )




class 							lowercase_						(		a			):

  '''simple docstring'''





  __lowerCAmelCase       :			Optional[int]     	= MCLIPConfig
  def __init__(  self ,			a_ ,			*a_ ,			**a_  )				->					str:


    """simple docstring"""
    super().__init__(a_ ,			*a_ ,			**a_  )
    UpperCAmelCase    				=						XLMRobertaModel(a_  )
    UpperCAmelCase    				=						torch.nn.Linear(
        in_features=config.transformerDimensions ,			out_features=config.numDims  )





  def     snake_case_      (  self ,			a_ ,			a_  )				->					str:


    """simple docstring"""
    UpperCAmelCase    				=						self.transformer(input_ids=a_ ,			attention_mask=a_  )[0]
    UpperCAmelCase    				=						(embs * attention_mask.unsqueeze(2  )).sum(dim=1  ) / attention_mask.sum(dim=1  )[:, None]
    return self.LinearTransformation(a_  ), embs





'''simple docstring'''




def    lowerCamelCase__		(    SCREAMING_SNAKE_CASE   : int = 1000    ):
  UpperCAmelCase    				=						-1
  UpperCAmelCase    				=						0
  for a in range(1							, n // 3    ):
    # Solving the two equations a**2+b**2=c**2 and a+b+c=N eliminating c
    UpperCAmelCase    				=						(n * n - 2 * a * n) // (2 * n - 2 * a)
    UpperCAmelCase    				=						n - a - b
    if c * c == (a * a + b * b):
      UpperCAmelCase    				=						a * b * c
      if candidate >= product:
        UpperCAmelCase    				=						candidate
  return product


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


