"""simple docstring"""


__A       			=      float("""inf""")






class 					a					:



  def __init__(		self   :    List[Any]						,  lowerCamelCase_   :    List[str]     )      -> Tuple:
      __a			      =						[0] * n
      __a			      =						[0] * n
      __a			      =						[0] * n
      __a			      =						[[] for _ in range(lowerCamelCase_     )]



  def        lowerCAmelCase_				(		self   :    List[str]						,  lowerCamelCase_   :    int						,  lowerCamelCase_   :    Optional[int]						,  lowerCamelCase_   :    Optional[Any]						,  lowerCamelCase_   :    Union[str, Any]=0     )      -> Dict:
      self.adj[a].append([b, len(self.adj[b]     ), c, 0]     )
      self.adj[b].append([a, len(self.adj[a]     ) - 1, rcap, 0]     )



  def        lowerCAmelCase_				(		self   :    Dict						,  lowerCamelCase_   :    Tuple						,  lowerCamelCase_   :    Any						,  lowerCamelCase_   :    Optional[int]     )      -> List[str]:
      if vertex == sink or not flow:
          return flow

      for i in range(self.ptr[vertex]						,  len(self.adj[vertex]     )     ):
          __a			      =						self.adj[vertex][i]
          if self.lvl[e[0]] == self.lvl[vertex] + 1:
              __a			      =						self.depth_first_search(e[0]						,  lowerCamelCase_						,  min(lowerCamelCase_						,  e[2] - e[3]     )     )
              if p:
                  self.adj[vertex][i][3] += p
                  self.adj[e[0]][e[1]][3] -= p
                  return p
          __a			      =						self.ptr[vertex] + 1
      return 0



  def        lowerCAmelCase_				(		self   :    List[str]						,  lowerCamelCase_   :    Union[str, Any]						,  lowerCamelCase_   :    Optional[Any]     )      -> int:
      __a      ,  __a			      =						0, source
      for l in range(31     ):  # noqa: E741  l = 30 maybe faster for random data
          while True:
              __a      ,  __a			      =						[0] * len(self.q     ), [0] * len(self.q     )
              __a      ,  __a      ,  __a			      =						0, 1, 1
              while qi < qe and not self.lvl[sink]:
                  __a			      =						self.q[qi]
                  qi += 1
                  for e in self.adj[v]:
                      if not self.lvl[e[0]] and (e[2] - e[3]) >> (30 - l):
                          __a			      =						e[0]
                          qe += 1
                          __a			      =						self.lvl[v] + 1

              __a			      =						self.depth_first_search(lowerCamelCase_						,  lowerCamelCase_						,  lowerCamelCase_     )
              while p:
                  flow += p
                  __a			      =						self.depth_first_search(lowerCamelCase_						,  lowerCamelCase_						,  lowerCamelCase_     )

              if not self.lvl[sink]:
                  break

      return flow
__A       			=      Dinic(10)
__A       			=      0
__A       			=      9
for vertex in range(1, 5):
 graph.add_edge(source, vertex, 1)
for vertex in range(5, 9):
 graph.add_edge(vertex, sink, 1)
for vertex in range(1, 5):
 graph.add_edge(vertex, vertex + 4, 1)

# Now we can know that is the maximum flow(source -> sink)
print(graph.max_flow(source, sink))

"""simple docstring"""


from doctest import testmod
from math import sqrt

def 						UpperCamelCase				(	_lowerCAmelCase   :							int						):
    __a			      =						[]
    if num < 1:
        return facs
    facs.append(1						)
    if num == 1:
        return facs
    facs.append(_lowerCAmelCase						)
    for i in range(2				, int(sqrt(_lowerCAmelCase						)						) + 1						):
        if num % i == 0:  # If i is a factor of num
            facs.append(_lowerCAmelCase						)
            __a			      =						num // i  # num//i is the other factor of num
            if d != i:  # If d and i are distinct
                facs.append(_lowerCAmelCase						)  # we have found another factor
    facs.sort()
    return facs


if __name__ == "__main__":
 testmod(name="""factors_of_a_number""", verbose=True)
