inline int read() {
int x = 0, f = 1;
char c = getchar();
while (c < '0' || c > '9') {
if (c == '-') {
f = -1;
}
c = getchar();
}
while (c >= '0' && c <= '9') {
x = (x << 1) + (x << 3) + (c ^ 48);
c = getchar();
}
return x * f;
}inline void write(int out) {
if (out < 0) {
putchar('-');
out = -out;
}
if (out > 9) {
write(out / 10);
}
putchar(out % 10 + '0');
}