namespace FastIO{
constexpr int IOSIZE=1<<20;
char ibuf[IOSIZE],obuf[IOSIZE];
char*p1=ibuf,*p2=ibuf,*p3=obuf;
inline char _gc(){if(p1==p2){p2=(p1=ibuf)+fread(ibuf,1,IOSIZE,stdin);if(p1==p2)return EOF;}return*p1++;}
inline void _pc(char c){if(p3==obuf+IOSIZE){fwrite(obuf,1,p3-obuf,stdout);p3=obuf;}*p3++=c;}
inline bool _isdigit(char c){return c>='0'&&c<='9';}
inline bool _isspace(char c){return c<=' ';}
template<typename T,bool IsSigned=std::is_signed<T>::value>struct IntReader{static void read(T&x){char c;while(!_isdigit(c=_gc()));x=c-'0';while(_isdigit(c=_gc()))x=x*10+(c-'0');}};
template<typename T>struct IntReader<T,true>{static void read(T&x){char c;while(!_isdigit(c=_gc())&&c!='-');bool neg=(c=='-');if(neg)c=_gc();x=c-'0';while(_isdigit(c=_gc()))x=x*10+(c-'0');if(neg)x=-x;}};
template<typename T,bool IsSigned=std::is_signed<T>::value>struct IntWriter{static void write(T x){if(x==0){_pc('0');return;}char buf[20];int n=0;do{buf[n++]=x%10+'0';x/=10;}while(x);while(n--)_pc(buf[n]);}};
template<typename T>struct IntWriter<T,true>{static void write(T x){if(x==0){_pc('0');return;}if(x<0){_pc('-');x=-x;}char buf[20];int n=0;do{buf[n++]=x%10+'0';x/=10;}while(x);while(n--)_pc(buf[n]);}};
inline void read(int&x){IntReader<int>::read(x);}
inline void read(long long&x){IntReader<long long>::read(x);}
inline void read(unsigned int&x){IntReader<unsigned int>::read(x);}
inline void read(unsigned long long&x){IntReader<unsigned long long>::read(x);}
inline void read(short&x){IntReader<short>::read(x);}
inline void read(long&x){IntReader<long>::read(x);}
inline void read(char&x){while(_isspace(x=_gc()));}
inline void read(bool&b){char c;while(_isspace(c=_gc()));b=(c!='0'&&c!='f');}
inline void read(std::string&s){char c;while(_isspace(c=_gc()));s.clear();do{s+=c;}while(!_isspace(c=_gc()));}
inline void read(char *x){char c;int k=0;while(_isspace(c=_gc()));do{x[k]=c;k++;}while(!_isspace(c=_gc()));x[k]='\0';}
template<typename T>typename std::enable_if<std::is_floating_point<T>::value,void>::type read(T&x){char c;while(!_isdigit(c=_gc())&&c!='-'&&c!='.');bool neg=(c=='-');if(c=='-'||c=='.')c=_gc();x=0;T base=1;while(_isdigit(c)){x=x*10+(c-'0');c=_gc();}if(c=='.'){c=_gc();while(_isdigit(c)){base*=0.1;x+=(c-'0')*base;c=_gc();}}if(neg)x=-x;}
inline void write(int x){IntWriter<int>::write(x);}
inline void write(long long x){IntWriter<long long>::write(x);}
inline void write(unsigned int x){IntWriter<unsigned int>::write(x);}
inline void write(unsigned long long x){IntWriter<unsigned long long>::write(x);}
inline void write(short x){IntWriter<short>::write(x);}
inline void write(long x){IntWriter<long>::write(x);}
inline void write(char x){_pc(x);}
inline void write(const char*x){while(*x)_pc(*x++);}
inline void write(const std::string&s){for(char c:s)_pc(c);}
inline void write(bool b){_pc(b?'1':'0');}
template<typename T,typename...Args>inline void read(T&x,Args&...args){read(x);read(args...);}
template<typename T,typename...Args>inline void write(const T&x,const Args&...args){write(x);write(args...);}
struct FastIO_{~FastIO_(){if(p3>obuf)fwrite(obuf,1,p3-obuf,stdout);}template<typename T>FastIO_& operator>>(T& x){read(x);return *this;}FastIO_& operator>>(char *x){read(x);return *this;}template<typename T>FastIO_& operator<<(const T& x){write(x);return *this;}}fio;
}using namespace FastIO;
#define cin FastIO::fio
#define cout FastIO::fio
#define endl '\n'加固后模板:
#include<bits/stdc++.h>
using namespace std;
namespace FastIO{
constexpr int IOSIZE=1<<30;
char ibuf[IOSIZE],obuf[IOSIZE];
char*p1=ibuf,*p2=ibuf,*p3=obuf;
inline char _gc(){if(p1==p2){p2=(p1=ibuf)+fread(ibuf,1,IOSIZE,stdin);if(p1==p2)return EOF;}return*p1++;}
inline void _pc(char c){if(p3==obuf+IOSIZE){fwrite(obuf,1,p3-obuf,stdout);p3=obuf;}*p3++=c;}
inline bool _isdigit(char c){return c>='0'&&c<='9';}
inline bool _isspace(char c){return c<=' ';}
template<typename T,bool IsSigned=std::is_signed<T>::value>struct IntReader{static void read(T&x){char c;while(!_isdigit(c=_gc()));x=c-'0';while(_isdigit(c=_gc()))x=x*10+(c-'0');}};
template<typename T>struct IntReader<T,true>{static void read(T&x){char c;while(!_isdigit(c=_gc())&&c!='-');bool neg=(c=='-');if(neg)c=_gc();x=c-'0';while(_isdigit(c=_gc()))x=x*10+(c-'0');if(neg)x=-x;}};
template<typename T,bool IsSigned=std::is_signed<T>::value>struct IntWriter{static void write(T x){if(x==0){_pc('0');return;}char buf[20];int n=0;do{buf[n++]=x%10+'0';x/=10;}while(x);while(n--)_pc(buf[n]);}};
template<typename T>struct IntWriter<T,true>{static void write(T x){using UT=typename std::make_unsigned<T>::type;if(x==0){_pc('0');return;}UT val;if(x<0){_pc('-');val=~static_cast<UT>(x)+1u;}else val=static_cast<UT>(x);char buf[20];int n=0;do{buf[n++]=val%10+'0';val/=10;}while(val);while(n--)_pc(buf[n]);}};
inline void read(int&x){IntReader<int>::read(x);}
inline void read(long long&x){IntReader<long long>::read(x);}
inline void read(unsigned int&x){IntReader<unsigned int>::read(x);}
inline void read(unsigned long long&x){IntReader<unsigned long long>::read(x);}
inline void read(short&x){IntReader<short>::read(x);}
inline void read(long&x){IntReader<long>::read(x);}
inline void read(char&x){while(_isspace(x=_gc()));}
inline void read(bool&b){char c;while(_isspace(c=_gc()));b=(c!='0'&&c!='f');}
inline void read(std::string&s){char c;while(_isspace(c=_gc()));s.clear();do{s+=c;}while(!_isspace(c=_gc()));}
inline void read(char *x){char c;int k=0;while(_isspace(c=_gc()));do{x[k]=c;k++;}while(!_isspace(c=_gc()));x[k]='\0';}
template<typename T>typename std::enable_if<std::is_floating_point<T>::value,void>::type read(T&x){char c;while(!_isdigit(c=_gc())&&c!='-'&&c!='.');bool neg=(c=='-');if(c=='-'||c=='.')c=_gc();x=0;T base=1;while(_isdigit(c)){x=x*10+(c-'0');c=_gc();}if(c=='.'){c=_gc();while(_isdigit(c)){base*=0.1;x+=(c-'0')*base;c=_gc();}}if(neg)x=-x;}
inline void write(int x){IntWriter<int>::write(x);}
inline void write(long long x){IntWriter<long long>::write(x);}
inline void write(unsigned int x){IntWriter<unsigned int>::write(x);}
inline void write(unsigned long long x){IntWriter<unsigned long long>::write(x);}
inline void write(short x){IntWriter<short>::write(x);}
inline void write(long x){IntWriter<long>::write(x);}
inline void write(char x){_pc(x);}
inline void write(const char*x){while(*x)_pc(*x++);}
inline void write(const std::string&s){for(char c:s)_pc(c);}
inline void write(bool b){_pc(b?'1':'0');}
template<typename T,typename...Args>inline void read(T&x,Args&...args){read(x);read(args...);}
template<typename T,typename...Args>inline void write(const T&x,const Args&...args){write(x);write(args...);}
struct FastIO_{~FastIO_(){if(p3>obuf)fwrite(obuf,1,p3-obuf,stdout);}template<typename T>FastIO_& operator>>(T& x){read(x);return *this;}FastIO_& operator>>(char *x){read(x);return *this;}template<typename T>FastIO_& operator<<(const T& x){write(x);return *this;}}fio;
}using namespace FastIO;
#define cin FastIO::fio
#define cout FastIO::fio超级加固后模板(???)
#pragma GCC target("sse,sse2,sse3,ssse3,sse4.1,sse4.2")
#pragma GCC diagnostic ignored "-Wunused-result"
#pragma GCC diagnostic ignored "-Wsequence-point"
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wunused-function"
#include<cctype>
#include<cstdint>
#include<cstdio>
#include<string>
#include<type_traits>
#include<cmath>
#include<utility>
#include<iomanip>
#include<iostream>
#if defined(__linux__)
#include <sys/mman.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#endif
namespace FastIO{
constexpr int IOSIZE=1<<20;
char obuf[IOSIZE];
char*p3=obuf;
#if defined(__linux__)
char*mmap_ptr=nullptr,*mmap_end=nullptr;
char ibuf[IOSIZE];
char*p1=ibuf,*p2=ibuf;
bool use_mmap=false;
inline void init_mmap(){int fd=fileno(stdin);struct stat st;if((fstat(fd,&st)==0)&(st.st_size>0)){void*p=mmap(nullptr,st.st_size,PROT_READ,MAP_PRIVATE,fd,0);if(p!=(void*)MAP_FAILED){mmap_ptr=(char*)p;mmap_end=mmap_ptr+st.st_size;use_mmap=true;return;}}use_mmap=false;p1=ibuf,p2=ibuf;}
inline char _gc_mmap(){return (mmap_ptr>=mmap_end)?EOF:*mmap_ptr++;}
inline char _gc_fread(){if(p1==p2){p2=(p1=ibuf)+fread(ibuf,1,IOSIZE,stdin);if(p1==p2)return EOF;}return*p1++;}
inline char _gc(){return use_mmap?_gc_mmap():_gc_fread();}
#elif defined(_WIN32)
char ibuf[IOSIZE];
char*p1=ibuf,*p2=ibuf;
inline char _gc(){if(p1==p2){p2=(p1=ibuf)+fread(ibuf,1,IOSIZE,stdin);if(p1==p2)return EOF;}return*p1++;}
inline void init_mmap(){}
#else
char ibuf[IOSIZE];
char*p1=ibuf,*p2=ibuf;
inline char _gc(){if(p1==p2){p2=(p1=ibuf)+fread(ibuf,1,IOSIZE,stdin);if(p1==p2)return EOF;}return*p1++;}
inline void init_mmap(){}
#endif
inline void flush(){fwrite(obuf,1,p3-obuf,stdout);p3=obuf;}
inline void _pc(char c){if(p3==obuf+IOSIZE){flush();}*p3++=c;}
inline bool _isdigit(char c){return (c>='0')&(c<='9');}
inline bool blank(const char x){return (x==' ')|(x=='\n')|(x=='\r')|(x=='\t');}
template<typename T,bool IsSigned=std::is_signed<T>::value>struct IntReader{
static void read(T&x){
char c;
while(!_isdigit(c=_gc()));
uint64_t tmp=c^48;
while(true){
char nc=_gc();
if(!_isdigit(nc)) break;
c=nc;
tmp=(tmp<<1)+(tmp<<3)+(c^48);
}
x=(T)tmp;
}
};
template<typename T>struct IntReader<T,true>{
static void read(T&x){
char c;
while((!_isdigit(c=_gc()))&(c^'-'));
bool z=(c=='-');
if(z) c=_gc();
uint64_t tmp=c^48;
while(true){
char nc=_gc();
if(!_isdigit(nc)) break;
c=nc;
tmp=(tmp<<1)+(tmp<<3)+(c^48);
}
x=(T)(z?~tmp+1:tmp);
}
};
template<typename T,bool IsSigned=std::is_signed<T>::value>struct IntWriter{
static void write(T x){
if(x==0){_pc(48);return;}
uint64_t v=(uint64_t)x;
char tmp[64];int len=0;
for(;v;v/=10)tmp[++len]=v%10+48;
while(len)_pc(tmp[len--]);
}
};
template<typename T>struct IntWriter<T,true>{
static void write(T x){
if(x==0){_pc(48);return;}
uint64_t v;
if(x<0){_pc('-');v=~(uint64_t)x+1;}
else{v=(uint64_t)x;}
char tmp[64];int len=0;
for(;v;v/=10)tmp[++len]=v%10+48;
while(len)_pc(tmp[len--]);
}
};
inline void read(int&x){IntReader<int>::read(x);}
inline void read(long long&x){IntReader<long long>::read(x);}
inline void read(unsigned int&x){IntReader<unsigned int>::read(x);}
inline void read(unsigned long long&x){IntReader<unsigned long long>::read(x);}
inline void read(short&x){IntReader<short>::read(x);}
inline void read(long&x){IntReader<long>::read(x);}
inline void read(char&x){for(x=_gc();blank(x)&(x^EOF);x=_gc());}
inline void read(bool&b){char c;for(c=_gc();blank(c)&(c^EOF);c=_gc());b=(c^'0')&(c^'f');}
inline void read(char *x){char a=_gc();for(;blank(a)&(a^EOF);a=_gc());for(;(!blank(a))&(a^EOF);a=_gc())*x++=a;*x=0;}
inline void read(std::string&s){s.clear();char a=_gc();for(;blank(a)&(a^EOF);a=_gc());for(;(!blank(a))&(a^EOF);a=_gc())s+=a;}
template<typename T>static T pow10(int e){T r=1;if(e>0)for(int i=0;i<e;i++)r*=10;else for(int i=0;i<-e;i++)r*=0.1;return r;}
template<typename T>typename std::enable_if<std::is_floating_point<T>::value,void>::type read(T&x){
char c;while((!_isdigit(c=_gc()))&(c^'-')&(c^'.'));
bool neg=(c=='-');
if(c=='-')c=_gc();
uint64_t intpart=0;
while(_isdigit(c)){intpart=intpart*10+(c^48);c=_gc();}
uint64_t fracpart=0;int frac_len=0;
if(c=='.'){
c=_gc();
while(_isdigit(c)){fracpart=fracpart*10+(c^48);frac_len++;c=_gc();}
}
T res=(T)intpart;
if(frac_len>0)res+=(T)fracpart*pow10<T>(-frac_len);
if((c=='e')|(c=='E')){
c=_gc();bool eneg=(c=='-');
if((c=='+')|(c=='-'))c=_gc();
int exp=0;
while(_isdigit(c)){exp=exp*10+(c^48);c=_gc();}
if(eneg)exp=-exp;
res*=pow10<T>(exp);
}
if(neg)res=-res;
x=res;
}
template<typename T>typename std::enable_if<std::is_floating_point<T>::value,void>::type write(T x,int prec=6,bool sci=false){
if(x<0){_pc('-');x=-x;}
if(sci){
int exp=0;
if(x>0){
while(x>=10){x/=10;exp++;}
while(x<1){x*=10;exp--;}
}
T rnd=0.5*pow10<T>(-prec);
x+=rnd;
long long ip=(long long)x;T fp=x-ip;
IntWriter<long long>::write(ip);
if(prec>0){
_pc('.');
for(int i=0;i<prec;i++){fp*=10;int d=(int)fp;_pc(d+48);fp-=d;}
}
_pc('e');
if(exp<0){_pc('-');exp=-exp;}else{_pc('+');}
if(exp<10)_pc('0');
IntWriter<int>::write(exp);
}else{
long long ip=(long long)x;T fp=x-ip;
T rnd=0.5*pow10<T>(-prec);
fp+=rnd;
long long carry=(long long)fp;ip+=carry;fp-=carry;
IntWriter<long long>::write(ip);
if(prec>0){
_pc('.');
for(int i=0;i<prec;i++){fp*=10;int d=(int)fp;_pc(d+48);fp-=d;}
}
}
}
inline void write(const std::pair<int,double> x){
int a=x.first;
if(a<7){
double b=x.second,c=b;
if(b<0){_pc('-');b=-b;c=-c;}
double y=5*powl(10.0,-a-1);
b+=y;c+=y;
int len=0;char tmp[64];
if(b<1)_pc(48);
else for(;b>=1;b/=10)tmp[++len]=std::floor(b)-std::floor(b/10)*10+48;
while(len)_pc(tmp[len--]);
if(a)_pc('.');
for(c*=10;a;a--,c*=10)_pc(std::floor(c)-std::floor(c/10)*10+48);
}else{
flush();
std::cout<<std::fixed<<std::setprecision(a)<<x.second;
}
}
inline void write(){}
template<typename T,typename...Args>inline void write(const T&x,const Args&...args){
write(x);
write(args...);
}
template<typename T>inline void write(const T&x){IntWriter<T>::write(x);}
struct FastIO{
FastIO(){init_mmap();}
~FastIO(){flush();}
template<typename T>FastIO&operator>>(T&x){read(x);return*this;}
template<typename T>FastIO&operator<<(const T&x){write(x);return*this;}
FastIO&operator<<(double x){write(x,6,false);return*this;}
FastIO&operator<<(float x){write(x,6,false);return*this;}
template<typename T>FastIO&putf(T x,int prec,bool sci=false){write(x,prec,sci);return*this;}
}fio;
}
using namespace FastIO;
#define cin FastIO::fio
#define cout FastIO::fio