Read input data in the correct format