2#include"../../kyopro_library/template.hpp"
4using ull=
unsigned long long;
using lll=__int128_t;
5constexpr lll
operator ""_lll(ull x) {
return static_cast<lll>(x); }
6constexpr const lll
INFLL=1_lll<<120;
10 while(c==
' '||c==
'\n') is.get(), c=is.peek();
12 if(c==
'-') neg=
true, is.get();
14 while(isdigit(is.peek())) x=x*10+is.get()-
'0';
20 if(x<0) os<<
'-', x=-x;
21 if(x==0)
return os<<
'0';
23 while(x>0) s+=x%10+
'0', x/=10;
24 reverse(s.begin(),s.end());
29lll abs(lll x) {
if (x<0)
return -x;
return x; }
30lll gcd(lll a, lll b) {
31 while(b) a%=b, swap(a,b);
ostream & operator<<(ostream &os, lll x)
constexpr lll operator""_lll(ull x)
constexpr const lll INFLL
istream & operator>>(istream &is, lll &x)