
A  :			List[Any]     				=				float('inf')







class     __A:




				def __init__(  self	,  _snake_case       )					->   str:


								'''simple docstring'''




								__a    							=					[0] * n
								__a    							=					[0] * n
								__a    							=					[0] * n
								__a    							=					[[] for _ in range(_snake_case       )]




				def        SCREAMING_SNAKE_CASE_	(  self	,  _snake_case	,  _snake_case	,  _snake_case	,  _snake_case=0       )					->   Tuple:


								'''simple docstring'''




								self.adj[a].append([b, len(self.adj[b]       ), c, 0]       )
								self.adj[b].append([a, len(self.adj[a]       ) - 1, rcap, 0]       )




				def        SCREAMING_SNAKE_CASE_	(  self	,  _snake_case	,  _snake_case	,  _snake_case       )					->   List[str]:


								'''simple docstring'''




								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]	,  _snake_case	,  min(_snake_case	,  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        SCREAMING_SNAKE_CASE_	(  self	,  _snake_case	,  _snake_case       )					->   Tuple:


								'''simple docstring'''




								__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(_snake_case	,  _snake_case	,  _snake_case       )
																while p:
																				flow += p
																				__a    							=					self.depth_first_search(_snake_case	,  _snake_case	,  _snake_case       )

																if not self.lvl[sink]:
																				break

								return flow
A  :			Any     				=				Dinic(1_0)
A  :			Optional[int]     				=				0
A  :			List[str]     				=				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))

from itertools import compress, repeat
from math import ceil, sqrt


def 					__lowerCAmelCase    (    a__						) ->						list[int]:

				if num <= 2:
								return []
				if num == 3:
								return [2]

				# Odd sieve for numbers in range [3, num - 1]
				__a    							=					bytearray(B'''\x01'''						) * ((num >> 1) - 1)

				for i in range(3		,					int(sqrt(a__						)						) + 1		,					2						):
								if sieve[(i >> 1) - 1]:
												__a    							=					i**2
												__a    							=					repeat(
												    0		,					ceil((num - i_squared) / (i << 1)						)						)

				return [2] + list(compress(range(3		,					a__		,					2						)		,					a__						)						)


if __name__ == "__main__":
					import doctest

					doctest.testmod()