const fs = require('fs');
const input = fs.readFileSync("/dev/stdin").toString().trim();
const fs = require('fs');
const input = fs.readFileSync("/dev/stdin").toString().trim().split(" ");
const fs = require('fs');
const input = fs.readFileSync("/dev/stdin").toString().trim().split("\n");
const fs = require('fs');
const [n, ...arr] = fs.readFileSync("/dev/stdin").toString().trim().split(/\s/);
const fs = require('fs');
const [n, ...arr] = fs.readFileSync("/dev/stdin").toString().trim().split("\n");
ex) n 입력 - 공백으로 구분된 n개의 값 입력 - m 입력 - 여러 줄에 걸쳐 m개의 값 입력
const fs = require('fs');
const input = fs.readFileSync("/dev/stdin").toString().trim().split(/\s/);
const n = input[0];
const n_arr = input.slice(1, n+1);
const [m, ...m_arr] = input.slice(n+1);