Your whole AI stack,
under one gateway.
Two ways to scale with LunaRoute: a unified gateway over every model you use, and private inference that squeezes more throughput out of dedicated servers you control.
;;!;;!!!!!!!!!!!;!!;;;;;
!!!!!!!!!!~~~~~~!~~!!~!!~!~!!!!!!!!!!;;;
!!!!~~~~~~~~~~~~==~~=~=~~~~~~~~~~~~~~~~!!!!!!!;!;;
!!!!~~~~~~~==~=======================~==~~~~~~~~~~!!!!!!;;;;
;!!!~~~~~~==============+=++=+==+====+=============~~~~~~~~~!!!!;;;;
!!~!~~~~==========++==++++++++++++++++++++++++==+++=======~~~~~~~~!!!!!;;;
!!!!~~~=~====+=+++++++++++++***+++++***++++++++++++++=====+======~~~~~~~!!!!!;;;
;!!~~~~======+===+++++++***+++**++********++***+++**++*+++++++=+=========~~~~~!!!!;;;;
!!!~~~~=====+++++++*+*+**++**************************++*++***++++++++==+=====~~~~~~!!!!;;;
!~!~~=====++++++++*****************xx*******xx**xx**************++*+++++++======~=~~~~~!!!!;;;
!!!!~=~====+++++++++**********xx*xxxxxx****xxxxxxxxxx****xx*********++++*++++++++=====~=~~~~!!!!!;;;
;!!~~~====+++++++**********xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx**xxxx*******++++++++++======~=~~~!!!!!!;;:
!!~~~=====+++++++******xxx*xxxxxxxxxxxxxxxxxxxxx%%%%xx%xxxxxxxxxxxxx**********++*++++++=======~~~!!!!!!;;;
!!~~~~====++++++*******xx***xxxxx%%xx%%xxxxxx%%%%%%%xx%%%%xxxxxxxxxxxxx******x*******++++++=+====~~~~~~!!;!;;;
!!~~~=====+++++**+****xxxxxxxxxxxxxxxx%%%%%%%%%%%%%%%%%%%%%%%%%%%xxxxxxxxxxxxxxx*********+++++=+======~~~~!~!;;;;:
!~~~~====++++++******xx*xxxxx%x%%%%%%%%x%%%%%%%%%%%%%%%%%%%%%%%%%%xxxx%%xxxxxxxxxxxxxx****+*++++++=======~~~~!!!;;;:
!!~~~===+++++++******xxxxxxx%%%%%%%%%%%%%%%%%%%%%%%%##%%%%%%%%%%%%%%%%%%%%%xxxxxxxxxxxxxxx******+++++=======~~~~~!!;;;;:
!!~~=~====++*++*****xxxxxxxx%%%%%%%%%%%%%%%%%###%%#######%%%####%%%%%%%%%%xxxx***xx****************++++++====~~~~!~!!!;;;:
!!~~~~==+==+*+********xxxxxxx%%%%%%%%%%%############%%%%%##%%%####%%%%%%%%xxxxxxx********************+++++++====~==~~~~!!;;;::
!!~~~~==+=++*+****xxxxxxxxxxx%%%%%%%%%%%%############%############%%%%xx%%xxx***xx********************++++++++====~==~~~~!!;;;::
!!~~~====++++*****xxxxxx%%%%%%%%%%%%%%%########################%%%%%%xxxxxxx**********++*******+++****+*****++++======~~~~~!!!;;;:
!!!~~=====++++*******xxxxx%%%%%%%%%%%##%#########################%%%%%xxxxx*******++++++++++++++++++++++++++**++++====~=~~~~!!!!;;;:
!!!~~=====++++*******xxxxx%%%%%%#%%%%%#################@@@@@#####%%%%%%xxxx*********+++++++===+++++++++++++++**+++++======~~~~!!!!;;;:
!!~~~~=+=++*****x**xxxxxxx%%%%%%%%%################@@#########%%%%%%%xxx**********++++++==++===+++++======++++++*++++======~~~~!!!!;;;;:
!!~~=====+++**+**xxxxxxxxxx%%%%%%%#########@#######@@@@@@@@@#####%%xxxxxxxx****+++++++++++++++++==========++==++++++++++++===~~~~~!!!;;;;:
!!~~~====+++**+**xxxxxx%xxx%%%%#%%%#######@@#@@#@@##@@@@@@@@#####%%%xxxxxxxx***++++++++++====+=+=============+==++++++++++++===~~~~~!!!;;;::
!!~~~~~=~==++++****xxxxx%%xx%%%%%%%##############@@@@@@@@@@#####%%%%x%%xx********+++++++=============================+++++++=====~~~~!!!!;;:::
;!!!~~~~=====+++**xxxxx%xxx%%%%%%%%%#####@@###@@@@@@@@@@@@@@@####%%%xx%xx***x****++++++++++============~~============+++++++=++====~~~~~!!!;;:::
!!!!~~~~~====+++***xxx%%xx%%%%%%%%%#####@@@#@@@@@@@@@@@@@@@@#####%%xxx%xx*********++++++++=============~~~~~===~~======++++++=++====~~~!~!!;;;::
;!!!!!!~~~~~===+++***xxxxx%%%%%##########@@@#####@@@@@@@@@@@@@@#%%#%%%%xx******+**++++==================~~~~~~~~==========++++++++=~~~~~~!!!!;;;::
;;;!!!!!~!~~~=~=+++***xxxx%%%%%%##########@@#####@@@@@@@@@@@@@@@%%%#%%%%xx******+**+++==========~~====~=~~~~~~~~~~==========+++++++==~~~~~~!!!!;;::,
;;;;;;;!!!!!~~====+**xxx%%%%%%%%%%#####@@@##@@@@@@@@@@@@@@@@@####%#%%%%%xxxxx*****++++++++++===~~~~~~~~===~~~~~===~~=========+++++++==~=~~~~!;;!;::,
;;;;;;;;!!!!!~~~===+***xxx%%%%%%%%%#####@@###@@@@@@@@@@@@@@@@@####%#%%%%%xxxxx*****++++++++++===~~~~~~~~===~~~~~===~~=========+++++++=====~~~!!;;;:::,
;;;;;;;;;;!!!~~~~==++***xx%%%%##%#########@@@@@##@@@@@@@@@@@@@@######%%xxxxx****+++++++++++++======~~~==~~~~~~===~~============++++++===~~~~!!!!!;;;:,
;;;:::;;;;;!!!~~~~=+++****x%%%%#########@@@@@@@@@@@@@@@@@@@@@@@#####%%%%xxxxx******+++++++++===========~~~~~~==~~~============++=+++++===~=~~~~!!!;;;:,.
;::::::;;;;!!!~~~~==++*+*xx%%##########@@@@@@@@@@@@@@@@@@@@@@@@@####%%%%xxxxx******+++++++++===+========~~~~~==~~~============++=++++++====~~~~!!!;;;::.
;::::::;;;;!!!!!~~====++***xx%%##########@@@@@@@@@@@@@@@@@@@@@@@@######%%%%xxx***xx*+++**+++++========~~===~~~===~~==============++++++====~=~~~!!!;;;::,.
::::::::;;;!!!!!~~====++***xx%%##########@@@@@@@@@@@@@@@@@@@@@@@@#######%%%xxxx**xx*+++***+++++++================~~==============++++++=+==~=~~~~!!;;;;,,.
:::::::::;;;;!!!~~===+++**xxxx%%%#######@@@@@@@@@@@@@@@@@@@@@@@@@@######%%%xxxxxx*****+*+++++++++++==============~~~==========++++++++++===~=~~!!!!!!;::,.
:::::::::;;;;;!!!~~===+++**xxxx%%%#######@@@@@@@@@@@@@@@@@@@@@@@@@@#######%%%xx%xx********+++++++++++++========================++++++++++=====~~~!!!!!;;:,.
::::::::::;;;;!!!~~=~==++***xx%%%%#######@@@##@@@@@@@@@@@@@@@@@@@@@@@@###%%%%%%%%xxx*xx****+++++++==++++===================+===++++++++++=====~~!!!!!;;;:,.
::::::::::;;;;!!!~~=~==++***xx%%%%#######@@@##@@@@@@@@@@@@@@@@@@@@@@@@@###%%%%%%%%xxxxxx***+++++++++++++++======++========+++==++++*+++++=====~~!!!!!;;;:,.
:::::::::;;;;;!!!~~~===++***xx%%%%%%########@@@@@@@@@@@@@@@@@@@@@@@@@@@@@####%%%%%%xxxxxxxx***+++*****++++++++++==+++===+++++++++***++++++=====~!~!!!;;;:,.
::::::::::;;;!!!~~~==++++***x%%#####%####@@@#@@#@@@@@@@@@@@@@@@@@@@@@@@@#####%%#%%%%%xxxxx**********++++++++++++==+++=+++++++++****+++++=====~~~~!!!!!;;:,.
:::::::::::;;!!!!~~~===+++***x%%#####%####@@@#@@#@@@@@@@@@@@@@@@@@@@@@@@@@#########%%%xxxxxxx********+++******++++++++++++++++++****+++++=====~~~~!!!!!;;:,..
:::::::;;;;;;;!!~~~~===++**xxxx%%############@@######@@@@@@@@@@@@@@@@@@@@@@@#########%%%%xxxxxx********************+++++++++++*****+++++++====~~~~~!!;!;;:,.
::::::;;;;;;;;!!~~~~===++**xxxx%%%###########@@######@@@@@@@@@@@@@@@@@@@@@@@@#########%%%xxx%%xx**xx****xxx**************++*******++++++++====~~!~!!!;;;;:,..
;:::::::;;;!!!!!~~~====++***x%%%%%###%%######@@###@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@######%%%%%%%%xxxxxxx**************xxx**xxx******+++++===~==~~!!!;;;;::,.
;:::::;:;;;!!!!!~~===++++***x%%%%%%##%%######@@####@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#######%%%%%%%%xxx%xxxxxxxxxxx*****xxx**xxx****+*++++====~=~~~!!!;;;;::,.
;;;;;;;:;;;!!!!!~=~==++++**x%x%%%%%%###%%#######@@###@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@########%%%%%%x%%%xxxxxxxxxxxxxxxxx**********++++======~~~~~!!!!;;;:,.
;;;;;;;;!;!!!!!~=~=++++**xx%x%%%%%%%##%%%######@@###@@@@@@###@@@@@@@@@@@@@@@@@@@@@@@@@@@@@######%%%%%%%xxx%%%xxxxx%%%xx***********++++======~~~~!!!!!;;;:,.
;;;;;;;;!;;!!~~~==++++***xx%x%%%%%%%###########@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@###@@@######%%%%%%#%%%%%%xx%%%%%***xxx**+++++++++====~~~~!!~!!;;;;::,.
;;;;;;!!!;!!~~~~==+++**xxxx%%x%%%%%#%##%#######@@@##@@@@@@@@@######@@@@@@@@@@@@######@@@###@@@###%%%%%%###%%%%%%xxxxxxxxx*x****+++++++====~~~~!!!;;;;;;::,..
;;;;;;!!!!!~~~~~==++***xxxx%%xx%%%%%%%#%%#######@@##@@@@@@##@######@@@@@@@@@@@@######@@@###@#####%%%%%%##%%%%%%xxxxxxxxxx******+++++++====~~~!;;;;;;:;:::,..
:;;!;;!!!~~~~~====++******xxxxxxxx%%%%%%%###########@@@######@@@@@@###@@@###@@@###@@@@@@@########%%%###%%%%%%xxxxxxxxx*x********++=++==~~~~!;;;;;::::::::,..
;;!!!!!!!~~~====+++******xxxxxxxx%%%%%%%%############@######@@@@@@###@@@###@@@###@@@@@@#########%%%###%%%%%xxxxxxxx*x*********++==+==~~~~!;;;:::::::::::,.
:;!!!!!!~~~=====++++******xx%%%xx%%%%%%%#%%##########################@@@@@@###@@@#################%#%%%%%%x%%%xxx**xx******++++++++==~!!;;;;;:::,:,,,,::,.
:;!!!!!~~~=====+++++******xxx%%xxx%%%%%%%%%%%########################@@@@@@#####################%%%%%%%%%xx%%xxxx**x*******+++++++==~~!!;;::::,,,,,,,,::,,
;!!!!~~~=====++++++********xxxx%xxx%%%%%%%#%%%##%%%##################################%###%%%%%%%%x%%%%x%%xxxxxxx*********+++++===~~~!;;;;:,,:,,,,,,,,,,,
;;!!!~~~======+++++**********xxx%xx%%%%%%%%%%%%%%%%#######################%%%##%##%%%%#%%%%%%%%xxx%%%xx%xxxxxx***********+++++=~~~~!;;;;::,,,,.,,,,.,,,,
;;!!!!~~~====+++++*******xxxxxxxxxxxx%%x%%%%%%#%%%%%%######%%%#######################%%%%%%%%%%%%%%xxxxxxxxxx*x****++++++++====~!!!;;;::,,,..,....,,,,
::;!!!~~~~====++++++++*******xxxx%%xx%%%%%xx%%%%##%%%###%%%######%%#####%###%%%%%%%%%%%%%%%%%%%%%%%xxxxxxxxx******+*++++=====~~!!;;;:::,,,,.......,,,,
::!!!~~~~~====++++++++*******xxxxxxxx%%%%%xx%%%%##%%###%%%%%%###%%###%%%###%%%%%%%%%%%%%x%%%%%%%xxxxxxxxxx*****+++++++=====~~~!;;;:::,,,.........,,,
,,:!!!!!~~~======+++***+++++++*****xxxx%%%%%%%%%%%%%%%%%%%%%%%%%##############%%%%%%xxx%%xxxxxxxxxxxxxxxx********++++===++==~!;;;::::,,.,.......,,,,
,:;!!!!~~~~~=====++++++==++=++++++**xxx%%xxx%%x%%%%%%%%%%%%%%%%%%%%%###%%%%%%%%%%%%xx%xxxxxxxxxxxxxxxx******+***+++====+==~!!;;:::,,,.,,.......,,,
,,:!!~!~~~~=====++++=========+++++***xxx%%%%%%%%%%%%%%x%%%%%%%%%%%%%%%%%%%%%%%%xxx%xxxxxxxxxxxx**********+**++++++======~!!!;;;::,,,,.........,,
.,,:!!!!~~~~=====++===~~~~~=====++++**xxxxx%%%x%%%%%%%xxxxxxxxxxxxxx%%%xx%%%%%%xxxxxxxxxx*xxxxx********++***++++=======~~!!!;;;:,,,,.........,,,
.,:;;!!!~~~=========~~~~~~~~~~====+++*xxxxxx%xx%%%xxx%%%%%%%%xxx%%%%%xxx%%%%%%xxxxxxx*xx***xxx**********+++++==+=+==~~~~~!;;;:::,,,.......,,,,
.,:;!!!~!~~~========~~~~~~~~~~~~==+++**xxxxxxxxxxxxx%%%xxx%%xxx%%%xx%%%xxxxxxxxxxxxx*xxx************+++++++===========~!!;;;::,,,,,...,,,,,,
.,:;;!!~!~~~=======~~~~!!!~!!~~~===++****xxxxxxxxxxxxxxxxxxxxxxxxxx%xxxxxxxxxxxxx**xxx***********+++++++++========~=~~!;;;;::,,,,,.,,,,,,,
.,:;;!!!~~~~~====~~~~!!!!!!!!~~~==++**xxx*xxxx**xxxxxxxxxxxxxxxxxxxxxxxxxxxxx***xx**********++++++++++========~~~~~~~!!;;;:::,,,,,,,,,,,
.,:;!;!!!!~~~===~=~~~~!!!!~~~~~~~+++******xxx**xxx**xxxxxxxxxxxxxxxxxxx**xxx********++*****+++++============~~~~~~~!!!!;;;::,,,,,,,,,,
.,:;!;!!!!~~~~=~==~~~~!!!!~~~~~~+++************xx*****xxxxxxxxxx***xxx**xx********+++++**+++++============~~~~~~~!!!!;;;::::::,:,,,,
.,:;;!!!!!~!~~~~=~~~!!!!~~~~~==+++**************************************++*****++***+++++++========~~~=~~~~~!!!!!!;!!;;::;::,:,,,,
.,:;;;!!!!~~~~~~~~~~~~~~~~~====++*+++++++**++*************************++*****++++++++++==========~=~~~~~~~~!~!!;;!!;;;:;::::,,,,
.,::;;;;!!!~~~~~~~===~~~~====++++++++++++++++****+++*****++++++++++++++***+++++++++++=========~~~~~~~~~~!!!!;;;!;;;;:::::,,,,,
,::;;;;!!!!~~~~~~~==========++++==+++++++**++***+++++++**+++++++++++++++++++++++=+==========~~~~~~~~!!!!;!!!;;;;;:::,,,,,,
,:::;;;;;!!!~~~~~~==~~=======+====++++++++++++++++++++++++++++++++==+++++==++=======~~====~~~~!!~~!!!!;;;;;;;::::::,,,,,
::::;;;;!!!!~~~~~~~~~~~~==========+++++++++++++++++++++++++++++===++++==++=======~~==~~~~~~!!~!!!!;;;;;;;;:::::,,,,,
:::;;;;;;!!!!!!!~~~~~~==~~~~============+++++==++++=====++==++===========~~~~~~~~~~~~~~~~!!!!!!;;;;;;;;;:::,,,,,,,
:::;;;;;!;!!!!~!!!~~~~=~~==~~==~~====================================~~~~~~~~~~~~~~!!!!!!!!!;;;;;;:::::,:,,,,,
:::;;;;;!!!!!!~~!~~~~~~~~=~~===~===~========================~~~~~~~~~~~~~~~~~~~~~!!!!!!!!;;;;:::::::,:,,,,
,:::;;;;;;;;!!!!!!!!!!~~~~~~~~~~~~~~~~~======~~~~=~==~~====~~~~~~~~~!~~!!~~~!!!!!!!;;;;;;;;::::::,:,,,,,
,:::::;;;;;;!!!!!!!!!~~!!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!~~~~!~~!!~~!!!!!!!!!!;;;;;:::::::,:,,,,,,
,::::;:;;;;;!!!!!!!!!!~!!!!~!~~!!!~~~~~~~~~~~~~~~~~!!~!~~!!~~!!!!!!!!;;!!;;;;;;;:;::::,:,,,,,,
,::::::::;;;!;!!!!!!!!!!!~~~~~!!!!!!!~~~!!!!~~~~!!!!!!!!!!!!!!!;;;;;;;;;:::::::::,,,,,,,,,
,,::::::::;;;;;!!;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!;;;!!;!!;;;:;;:;;;:::::,:,,,,,,,
,,,::::::;::;;;;;;;;;;!!;!!;!!;!!!;;;;;!!;;;;;;;;;!;;;;;;;;;::;:;::::,,,,,,,,,,,
,,,:::::::::;;;;;;;;;;;;;;;;;;!!;;;;;;!;;;;;;;;;;;;;;;;::::::::,:,,,,,,,,,
,,,,,,::::::::::;:::;;;;;;;;:;;;;;;:;;;;:::;;:::::::::,::,,,,,,,,,,,
,,,,,,,,,::::::::::::::::::::::::::::::::::::::,,,,,,,,,,,,,
,,,,,,,,,::::,::::::::::::,,::::::,,:,,,,,,,,,,,,,
,,,,,,,,,,,,,,,:,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,
One gateway for every model your teams already use.
Put LunaRoute in front of your provider keys or use ours. Teams get one OpenAI-compatible endpoint, finance gets one ledger, and platform engineering gets policy that follows users, keys, agents, and workloads.
teams + agents
|
| OpenAI-compatible or Anthropic-compatible requests
v
+--------------------------+
| LUNAROUTE ENTERPRISE |
| |- policy + budgets |
| |- routing + failover |
| '- ledger + accounting |
+-----------+--------------+
|
+---------+---------+---------+
v v v
BYO keys LunaRoute private
providers providers inferencePrivate inference, without idle dedicated GPUs.
Bring dedicated capacity under the same gateway. LunaRoute can run private models on servers you control, route sensitive workloads there first, and spill only the traffic you allow.
glm-5.2 agentic coding default kimi-k2.7 long-horizon planning qwen-3.6-plus fast, cheap workhorse minimax-m2.7 whole-repo context minimax-m3 m2.7's smarter successor deepseek-v4-pro deep reasoning & review
Idle GPUs are expensive GPUs.
Once the rig is a fixed cost, utilization is savings. The LunaRoute scheduler does not push past the server limit; it controls who enters the backend, keeps realtime and agent work responsive, and lets flex or ballast work use the gaps.
$ lunaroute-cli sched status srv-east-1 srv-east-1 8 x B200 single-tenant admission cap ............... max_in_flight = 64 efficient target ............ b_star = 56 backend waiting ceiling ..... 0 realtime / agents ........... priority 0 flex delivery work .......... priority 10 ballast background .......... priority 100 capacity rule ............... never admit past max_in_flight gap fill .................... use spare seats, yield on deadline risk
NO LOGS, at enterprise scale.
The same posture as the public product, contractually: request and response bodies are processed in memory and never stored by LunaRoute. On private inference, traffic stays on your single-tenant path.
+
* · · . * *
. * *
* . . + + *
* + ·
*
.. . + +
. * *
* *
* * . · +
·* . . +
+ +
+ .
· ·. .
* · .
· + .
* * . · ·
* + + *
· +
+ · .
+
· . *
· * * . +
* + . +
* +
+ .
. * . * +
. * + *
+ *
* . * Let's size your fleet.
Tell us your models, your traffic, and whether you're bringing GPUs or renting ours. We'll map it to a gateway + private inference plan.
;;!;!!!;!!!!!!!;!;!;;;;;
;!!!!!!!!~!!~!!!~~~!!~!!~!~!~~!!!!!!!;;;;;
;!!!!!!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!!!!!!!!;;;;
!;!!~!!~~~~~~~~~~~~~=~~~=====~===~=~~=~~~~~~~~~~~~~~~!!!!!!!!;;;
;!!!~~~~~~~===~=~====================================~~~~~~~~~~!!!!!!;;;
!!!!~~~~~~~~=~============+++==+++=+++++======++=========~==~~=~~~~!~~!!!;!!;;
!!!!~~~~~~~~========+++++++++++++++++++++++++++++++++===++++======~=~~~~~~~~!!!!!!;;
!!!~~~~~=========++=+++++++++++++++**+++++++++**+++++++++++++++++++=======~~~~~~!!!!!!!;;;
!!!!~~~~======++===++++++**++*++**++*****************+++++++**+++++++====+====~=~~=~~~~~!!!!!;;;
!!!~~~~~=========++++++++***************************************++++++++++++=========~~~~~~~!!!!;;;;;:
!!!~~~~=====+==+++++++++**************xx******xxxx****xx*****************++++++++++++=====~=~~~~~~!!!!!;;;
!!!~~~======++=+++++++***********xx****xxxx**xxxxxxx**xxxx*****************++**++++++++++=+=====~~~~~~!!!!!;;:
!!~~~~=~===++++++++++***************xxxxxxxxxxxxxxxxxxxxxxxxx**xxxxxx*****************++++++=====~=~~~~~~~!!!!;;;:
!!~~~~~=====+++++*++*******xx***x**xxxxxxxxxxxxxxxxxxxxx%%xxxxxxxxxx**xx**xx************++++++++++======~~~~!!!!!;!;;;
!!!~~~~===+=+++++**+*********x****xxxxxxxxxx%%xxxxxxxxx%%%xx%%xxxxxxxxxxxxxxxxx**xxx**********+++++++++======~~~!!!!!!;;;:
!!!~~~~~==+++++++************xxx*xxxxxx%xxxxx%%%%%xxxxx%%%%%%%%%xxxxx%%%xxxxxxxxx***xxxx*********+++++++++=======~~!!!!!!!;;;:
!!~~~=====++++++++**********xxxxxxxxx%%xxxx%%%%%%%%%%%%xxx%%%%%%%%%%%%%%%xxxxxxx%%xxxx***************++++++=++===~~=~~!~~!!;;;;:
!!~~~~~===+=++++++*****x****xxxxxxx%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%xxxxxxxx**xx*********++++++=++====~=~~~~!!!;;;;;:
!!~~~~~=====+++++******xx*xxxxxxxxxx%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%xxxxxxxxxxxxx**********+++++=++======~~~~!!!;:;;::
;!~~~======++++*+******xxxxxxxxxxxxxxxxxxxxx%%%%%%%%%%%##%%####%%###%%%%%%%%%%%%%%%%%%%xxxxxxxxxxxxxxx********++++++=++======~~~!!;;;:::::
!!~~~=====+=+++++*********xx*****xx**xxxxxxx%x%%%#%%%%%###%%%%%###########%%%##%###%%%%%%%%xxxxxxxxxxxxxx*******++++++=+++===~~~~!!;;::::,,,
!~!~~=====+++++++*****************x*****xxxxxxxx%%%%%%%%###%%%#############%%%######%%%%%%%%%%xxxxxxxxxxxxx*******++*++++++++==~~~~!;;::::,,,,
!!!~~=====++++++*************************xxxxxxx%xx%%%%%#%################%%%#####%%%%%%%%%%%%%%%%%%%xxxxxxxx*******+++++++++===~~~!!;;::::,,,,,
!!!!~~=====+++**+**++++++***++++***********xxxxxxxxxx%%%%%%%%#################%#####%%%%%%#%%%%%%%%%%%%%xx%%xxxx*******+++++++++====~~!!;;::,,,,,.,,
!!!~~~====++++**********+++++++++**+++***********xxxxxxxxx%%%%%##@@@##################%%######%%%%%%%%xxxxxxxxxxx**xxx******+++++++===~~!!;;::,,,,..,,
!!!~~~~===++++***+*+++++++++===++++++++++**+++******xxxxxxxx%%%%%##@@##########################%%%%%%%%%%x%xxxxxxx***xxxx*****+++++++===~~!!;;::,,.,..,,
!!!~~====+++++++++++++++==+++++++++++++++***+++*********xxxxxx%%%%%##@############@@@#########%%%##%%%%%%%%%%xx%%%xxxx*********+*++++==+==~!!!;;::,,,,....
!!!!~=====++++*+++++==+++++++=====+++++++++++**+++******xxxxx%xxx%%#####@@@@@###@@@@@@############%%%####%%%%%%%%%%xxxxxxxxx*****++++++==+==~!!;::::,,,....,
;!!~~=====++++*++++++==+++++++=====++=+++++++++*+++******xxxxx%xxx%%%#####@@@@@@#@@@@@@######@@####%%%######%%%%%%%%%xxxxxxxxx*****+++++==++=~~!!;::::,,,....,
!~~~~~===++++++++++=++====================+++++++++********xxxx%%%%%%%#####@@@@@@@@@@@######################%%%%xx%xxxxxxxxx********+++++++===~~!!;;::,,,.....
;!~~~~~===+++++++===+++====================+++++++++********xxxx%%%%%%%%####@@@@@@@@@@@@@@#@#################%%%%%x%xxxxxxxxxx*******+++++++====~~!!;;::,,,,...,
!!!~~~====+++++++====++===================++++++++++++++****x***x%%x%%%%######@@@@@@@@@@@@@#@@@################%%%%%%%%xxxxxxx*xx*******+++++======~!;;:::,,,,.,.,
;!!~~~====+++++++====++=====================++++++++++++++***x***x%%x%%%%######@@@@@@@@@@@@@@@@@@###############%%%%%%%%%xxxxxxx*xx*******+*+++======~!;;::::,,,.,,,
!!!~~~====+++++==++===========================+++++++++++++*****xxxxxxx%%%####@@@@@@@@@@@@####@#####@@@############%%%%%%xxxxxxxxx**x****++++++=====~~~!;;;;::,,,,,,
!!!~~~~===+++++==++======~======~===~~==========++++++++++++*****xxxxxxx%%%####@@@@@@@@@@@@####@@@###@@@#############%%%%%xxxxxxxxx**x*****+++++======~~~!;;;;::,,,,,,
;!!~~~~===++++++==+=++=============================+++++++********xxxxx%%%%%%%##@@@@@@@@@@@@@@@@@@@@@@@@@@####%%%%%###%%%%%xxxxxxxxxx********++++++====~~~~~!;;;:::,,,,,
;!~~~~===+++++++=+=++==============================+++++++********xxxxx%%%%%%%##@@@@@@@@@@@@@@@@@@@@@@@@@@@####%%%%###%%%%%xxxxxxx*****+++++++++++++====~~~~~!!;;::::,,:
;!!~~~~===++++++++++=======~~====================+++++++++******xxxxxxxxx%%%%%###@@@@@@@@@@@@@@@@@@@@@@################%%%#%%xxxxxx*******+++++++++++++===~~~~!!!;;;:::::,
;!!~~~~==+=+++++++++=======~~===================++++++++++******xxxxxxxxx%%%%####@@@@@@@@@@@@@@@@@@@@@@################%%%#%%xxxxx***+*++++++=+=+++++++===~~~~!!!!;;;:;;::
;!!~~~====++++++++============~~==================+++++****+++*xxxxxxxx%%%%%#######@@@@@@@@@@@@@@@@@@@###@@@###@@######%%%%%%%%xx***+++++++++======++========~~!!~!!!;;;:::,
;!!~~~====++++++++========================+=====+++++++***++++*xxxxxxxx%%%%#####@#@@@@@@@@@@@@@@@@@@@@@##@@@###@@#######%%%%%%xxx**++++++=+==================~~!!~!!!!;;:::,
!!~~~=====++++++++++++=====================+++===++++++***+++*xxxxxxxxxx%%%%%#####@@@@@@@@@@@@@@@@@@@@@##@@@###@###%%%##%%%%%xxxx**++++================++====~~~!!!!!!;;::::
;!!~~~=====++++++++++++====++===============+++===++++++***++*xxxxxxxxxx%%%%%%####@@@@@@@@@@@@@@@@@@@@@@##@@@###@###%%%##%%%%xxxx***+++++=====~~~=~~~~========~~~!!!!!!;;:::,,
;!!~~~===+==++++++++++===++===========+++++++++===+++++*+*****xxxxxxxxxx%%%%####@@@@@@@@@@@@@@@@@@@@@@@@@@######@@@#####%%%%%%xx***++++=====~~~~~~~~~~~========~~!!!!!!;;;:::,
!!!~~~===+=+++++++++++===++===========++++++++==++++**********xxxxxxxxx%%%%###@@@@@@@@@@@@@@@@@@@@@@@@@@@@######@@@#####%%%%x%xx***+++=====~~~~~~~~~~~~~~~=====~~!!!!!!!;;:::,
;!!~~~====++++*+++++++++++++==+++===========+++++++++******x*xx*xxxxxx%%%%%%####@@@@@@@@@@@@@@@@@@@@@@@@##############%%###%%xxxx**++++======~~~~~~~~~~~~~~~=====~!!!!!!;;;;:::,
;!!~~~====++++++*+++++++++++==+++========++++++++++++****xxxxxxxxxxxxx%%%%%%####@@@@@@@@@@@@@@@@@@@@@@@@##############%%###%%xxxx**++++=====~~~~~~~~!!~~~~~~~====~~!!!!!;;;;:::,
;!!!~~====++++++****++++++++++++++++++++++++***********xx***xxxxxx%%%#########@@@@@@@@@@@@@@@@@@@@@@@@@@###@@@#######%%%###%%xxx***+++===~=~~~~~~~!!~~!~~~~~~=~~~~~!!!!!!;;;:::,
;!!~~~=====+++++****+++++++++++++++++++++************xxx***xxxxxxx%%#######@@@@@@@@@@@@@@@@@@@@@@@@@@@@@###@@@#######%%%###%%xxx***+++===~~~~~~~~~!!~~!!~~~~~~~~~~~!!!!!!;;;:::,
;!!~~~~====+++*****++++++*****+++++++++*****+++***xxx**x**xxxx%xx%%%########@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@###########%%##%%%%x**+++++==~~~~~~~~~!!!~~!!!!~~~~~=~~~~~!!!!;;;::,,
;;!!~~~~====+++*******+***********++**************xxxxxxxxxxx%%%%%%########@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@###########%%#%%%%%x**+++++==~~~~~~~!!!!!~~!!!!~~~~~=~~~~~!!!!;;;::,,,
;;!!~~~~==++++++********************************xxxxxxxx%%%%%%%%%%%%%#####@@@@@@@@@@@@@@@@@@@@@@@@@@@####@@@@@@#############%xx****++=+===~~~~~~~~~~!!!!!!~~~~~~~~~~!!!!!;;;::::,,
;;!!~~~~===+++++*****************************xxxxxxxxx%%%%%%%%%%%#######@@@@@@@@@@@@@@@@@@@@@@@@@@@@@####@@@@@@#############%xx****++=+===~~~~~~~~~~!!!!!!~~~~~~~~~~!!!!!;;;:::,,,
;;!!~~~~======+++******xxxxx***xx****xxxxxxxxxxxxxxxx%%%%%%%%%%%##@###@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@################%%%%%xxx***++=====~~~~~~~~~!~~~~~!!~~~~~~~~!!!!!!;;;;::,,
;;!!~~~~======+++******xxxxxxxxxxxxxxxxxxxxxx%%%xxx%%%%%%%%%#%##@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#########%##%###%%%%%xxx***++======~~~~~~~~!~~~~~!~~~~~~~~~!!!;;!;;;:::,,
;;;!!~~~~====++++++*****xxxxxxxxxxxxxxxxxxxxx%%%xx%%%%%%%####@@@##@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@################%%xx***+*++=======~~~~!!!~~~~~~~~~~~~~~~!~!!!!;;;:::,,,
;;!!!~~~====++++++*****xxxxxxxxxx%%%%%%%%%%%%%%%%%%##%%#####@@@@@@#@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@#################%%xxx****++=======~~~~!!!~~~~~!~~~~~~~~!!!!!!!;;:::,,,
;!!!!~~~=====+++++*****xxxxxx%xxx%%%%%%%%%%%%%%#########@@@@@@@###@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@######@########%%%%#%%%%%%%xxxx*+++====~===~~~~~~~~~~~~~~~==~~~!!!!!;;;;;:::,,
;!!!!~~~======++++******xxxxx%xxx%%%%%%%%%%%#############@@@@@@###@@@@@@@###@@@@@@@@@@@@@@@@@@@################%%%%%%%%%%%%%%%xxx*+++========~~~~~~~~~~~~~~==~~~~!!!!!;;;;;:::,,
;;!!!~~~=======+**********xxxx%%%%%%%%%%%%%%%%%#########@###@@@@@@@@@@@@@@@@####@@@@@@@@@@@@@#######%%%%%%%%%%%%%%%%%%%%%%%%%%xx****++++========~~~~~~~~~~==~~~~~!!!!!;;;;;::,,,
;;;!!~~~=======++**********xxx%%%%%%%%%%%%%%%%%##################@@@@@@@@@@@####@@@@@@@@@@@@@######%%%%%xxxxxxxxxxxxx%%%%%%%%xxx*x**+++++=======~~~~~~~~~~=~~~~~~!!!!;;;;;:::,,,
;;!!!~~~=====+++++**+***x**xxx%%%%%%%%%%%%%######################@@@@###@@@@@@@###@@@@##########%xxxxxxxxxxxxxxxxxxxxx%%%%xxxxxxxx**++========~~~~~~=======~~~~!!!!;;;;:;::::,
;;!!!~~~=~===+++++**+******xxxx%%%%%%%%%%%%%######################@@@###@@@@@@@###@@@@##%##%%%%%xxxxx**xxx**********xxxxx%xxxxxxxxx**++====+======~~======~~~~~!!!!;!;;;;:::,,
:;!!!~~~~======++++******xxxxxxxxx%%%%%%%%%%#########################@@@#######@@@@@#####%%%xxxxxx*xxx*******************xxxxxxxxxx***++++=+=============~~~~~!!!!;;;;;:::::,,
;;!!~~~~==~===+=++*******xxxxxxxxx%%%%%%%%%######%##################@@@#######@@@#####%%%xxxx***********++++***+++*******xxxxxxxxxx**++++++++==========~~~~~!!!!!;;;;;::::,,
:;;!!!!~~=======+++++*+*******xxxxxxxxxxxxx%%%%%%##########################@@@#####%%%%%xx*xxx****+++**+++++++++*****+++****xxxxxx****+++++====+++==~=~~~~~!!!!!;;;;;:;::,,,
;;;!!!!~~~=======+++++++*******xxxxxxxxxxxx%%%%%%%#####%######%%%###############%#%%%%%x***x******++++++++==++++++++*+++++***xxxx*****+*+++++==+++==~~~~~~~!!!!;;;;;;;:::,,,
;;;!!~!~~=~=====++++++*****xxxxxxxxxxxxx%%%%%%%%%%%%###%########%%##############%%%xxxx*******++++++=======+++===+++=++++++**xxx****++++++++++=+===~~~~~~!!!!;;;;;;::::,,,
:;;;!!!!~==~====++++++******x*xxxxxxxxxx%%%%%%%%%%%%%%%%%%######%%%####%%%#####%%%xxxx******++++++=====================+++++*xx****++++++++++=====~~~~~~~~!!!;;;;;;::,:,,,
;;!;!!~~~~~~=====+++++**++*******xxxxxxx%%%%%%%%%%%%%%%%%###%%%###%%%%%%%%%%%%%xxxx*****++++++++======~~~==========+++++++******+**++++==+====~~~~~~~!!!!!!;!;;;:::::,,,
::;!;!~!~~~~======++++**+++*********xxxxxx%%%xxx%%%%%%%%%%##%%%%%%%%%%%%%%%%%%xxxx*****+++++++========~~~~~~========+++++++****+++++++=======~~~~~~~!!!!!!;!!;;;:::,,,,,
:;;;!!!~~~~~====++++++***********xxxxxxxxxxxx%%%%%%%%%%%%%%####%%%%%%%%%####%%xx****++++++=++====~======~~==========+++++++++*++**+++++======~~~~~~~!!!!!!!;;;::::,,,,
:;!!!!!~~~~~====++++++***+********x*xxxxxxxxxxx%%%%%%%%%%%%%%%%%%%%%%%%###%%%%*****+++++==+====~~======~~~==========++++++++++**+++=+======~~~~~~~!!!!!!!;;;;::::,,,
,:;;!!!~~~~~~~=====+++++++*********x***xxxxxxxxxxx%%%xxx%%%xxx%%%%%%%%%%%%%xxx*******+++===========~~~~~~~============+++**+++++++=+======~~~~~~!!!!!;!!;;;:::::,,,,
,:;!!!!~~~~~~~=====++++++***+*********xxxxxxxxxxx%%%xxx%%%xxx%%%%%%%%%%%%xxxx*******+++==========~~~~~~~~===========+++***++++++========~~~~~~!!!!!;!!;;;:::::,,,,
,:;;!!!~~~~~==~===++==+++***************xxxxxxxxx%%%%%xxx%%%xxx%%%%%%xxxxxxxxxx**+*++++====~~~===~~~=============+++****+++==========~~~~~~!!~~!!!!!;;;:::::,,,,
,:;;!!!~!~~~==~===++==+++**+***********xxx*xxxxxxxx%%xxx%%%xxx%%%%%%%xxxxxxxxx****++++=+==~~~===~~~============++++**+++++==========~~~~~!!~~!!!!;;;;;:::,,,,,
.,:;;!!!!!~~~==~=====++=+++******************xxxxxxxxxxxxxxxxxxxxx%%%xxx%%%xx***+*+++++============~~~======++++++++++++++========~~~~~~!!!!!!;;;;;;;;::,,,,,,
.,:;!!!!!!~~~~=~====++===+++*+**++************xxxx**xxxxxxxxxxxxxxxxxxxxxxxx*****++++++==================++++++*++++++++======~~~~~~~~~!!!!!!;;;;;;;::,,,,,,
.,:;;!!!!!~~~~~~=====+==+++++++***+**************xxxxxx**xxxxxxxxxxxxxxxxxxxxx*+++*++===++===========+===++++++++++++=+====~~~=~~~!~~!!!!;;;;;;:::::,,,,,,
.,:;;!!!!!!~~~~~======++=++++++*****++*******************xxxxxxxxxxxxxxxxxx***x**++++++===+====+++===+++++++++++==========~~~~~~~!!!!!!!!!;;;::::::,,,,,
.,:;;!;!!!!~~~~~======++==+++++++**+++*******************xxxxx******xxxxxx***xx***+**++++++++++++==+++++++++++==========~~~~~~~!!!!!!!!!;;:::::::,,,,,
,:;;;;!!!!!~!!~~~~==========+++++++**+++********************************************++++++***+++++*+++++++============~~~~~~!!!!!!!;;;;;;:::::,,,,,,
::;;;!!!!!!!!~~~~~========+++++++++*++*****+++************************************++++++**++++++++++++==========~~~~~~~!~!!!!!!!;;;;;;:::::,,,,,
:::;;;;!!!!!!~~~~~~~~=====+++++==++++++++++++******++***+++***********+++***********++*++++++++++===++==========~~~~~~!!!!!!!!!;;;;;::::,,,,,,
::::;;;!!!!!!~!~~~~~~~=====+=====++++++++++++++***+++**++++++********+++++***+++**++++++==++++++==+==========~~~~~~!!!!!!!!!;;;;;;::,:,,,,,,
,::;;;!;!!!!!!~~~~~~~~==========+++++++++++++++++++++++**+++++++++++***++++++++++++++++++==============~~~~~~~~~~!!!!!!;;;;;;:;::::,::,,,,
:::;;;;!!!!!!!!~~~~~~==~~======++=====++===+++++++++++++++++++++++++++++++++======+++++=======~~~~~~~~~~~~!!!!!!!!!;;;;;;;::::::,,,,,,
,::;;;;;!!!!!!!~~~~~~~~~=====~========++==++++++++++===+++++++++=++++++++++=====+=========~~~~~~~~~~!!~!!!!!!!!!!;;;;;;:::::,:,,,,,,
,::::;;;;;!!!!!!~~~~~~~~~~~=============+=====+++++++++===========+=++++++++====~~~===~~==~~~~~~~!!~~!!!!!;!!!!;;;:;::::::,,,,,,
,:::;;;;;;!!;!!!!~~~~~~~~~~~~~~~~~===========================================~~==~~~~~=~~~~!!!!~~!!!!!!;;;;;;;;:;;::::,,:,,,,,
::::;;;;;;!;!!!!!~~~~!~~~~~~~~~~~=======================================~~~~~~~~~~~~~~~~!!!!~!!!!;!!;;;;;;;::;:::::,,:,,,,
,::::;;;;;;;!!!!!!!~~~!!!~~~~~~~~~~==================~~~~~==~~~~~~~=~~~~~~~~~~~~~~!~~!!!!!!!!;;;;;;;;;:::::::,,,,,,,,,
,:::;;:;;;;;;!!!!!!!!!!!~~~~~~~~~~~~~~~~~======~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!!~~~~!!!!!!!!;;;;;;;;;:::::::,,,:,,,,
,::::::;;;;!;;!!!!!!!!!!!~~!!!!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~!!~~~!!!!!!!!!!!;;;;;;;;;;;;::::::,,,,,,,,,
,,,::::;;;;;;;;;!!;!!!!!!~!!!!~~~~~~!!~~~~~~~~~~~~!!~~!!!!!!!!!~~!!!!!!!!!!;!!;;;;;;;;;;;::::::::,,,,,,,,,
,,::::::;;;;;;;!;;;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!~~!!!!!!!!!!!!!!!!!!;;;;;!!;;;;;;;:::::::,,,,,,,,,,,
,,,::::::;;;;;;;;;;;;!;;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!;;;;;;;!!;;;;;;;;;;;:::::::,,,,,,,,,,
,,,:::::::;;::;;;;;;!!!!!!!;!!!!;;!!!!!!!!;;;;;;!!;;;!!!;!!;;;;;;;;;;;;;:::::::::,,,,,,,,,
,,:::::::::;:;;;;;;;;;;;;;;;;;;;;;;;!!!!;;;;;;;;;;;;;;;;;;;::;;;::::::,::,,,,,,,,,,,
,,,:,,:::::::;;::;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;::;:::::::::,,,:,,,,,,,,,,
,,,,,,,::::::::::::::::::;;:;;;::;;;;;;;::::::::::::::,:::::,,,,,,,,,,,,
,,,,,,,,,,,:,:::::::::::::::::::::::::::::::,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,:,,,,:::,::,:,,,:::,,:,,,,,,,:,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,,,,