#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <algorithm>
using namespace std;
#define I_O(x) freopen(""#x".in","r",stdin);freopen(""#x".out","w",stdout)
#define forp(i,a,b) for(i=a;i<=b;i++)
#define form(i,a,b) for(i=a;i>=b;i--)
#define until(x) while (!(x))
#define INF 2139062143
#define NINF -2139062144
#define IN(x,a,b) (a<=x && x<=b)
template <typename T>
inline void input(T& x)
{
char ch=getchar();
while (!(IN(ch,'0','9')||ch=='-'))
ch=getchar();
if (ch!='-')
{
x=0;
do
{
x=x*10+ch-48;
ch=getchar();
}
while (IN(ch,'0','9'));
}
else
{
ch=getchar();
x=0;
do
{
x=x*10+ch-48;
ch=getchar();
}
while (IN(ch,'0','9'));
x=-x;
}
}
inline int get_int()
{
char ch=getchar();
int x=0;
while (!(IN(ch,'0','9')||ch=='-'))
ch=getchar();
if (ch!='-')
{
do
{
x=x*10+ch-48;
ch=getchar();
}
while (IN(ch,'0','9'));
}
else
{
ch=getchar();
do
{
x=x*10+ch-48;
ch=getchar();
}
while (IN(ch,'0','9'));
x=-x;
}
return x;
}
template <typename T>
inline T sqr(T x){return x*x;}
template <typename T>
inline T pow(T x,T y)
{
T tmp=x,ret=1;
while (y)
{
if (y&1)
ret*=tmp;
y>>=1;
tmp*=tmp;
}
return ret;
}
#define randomize srand(time(0))
#define random(l,r) (l+rand()%(r-l+1))
#include <string>
using namespace std;
inline void input(string& s)
{
char ch=getchar();
while (!IN(ch,33,126))
ch=getchar();
s="";
do
{
s+=ch;
ch=getchar();
}
while (IN(ch,33,126));
}
inline void input_line(string& s)
{
char ch=getchar();
while (!IN(ch,32,126))
ch=getchar();
s="";
do
{
s+=ch;
ch=getchar();
}
while (IN(ch,32,126));
}
inline void output(string& s)
{
int i;
for (i=0;s[i]!='\0';i++)
putchar(s[i]);
}