input and output as int list