#sdpsgssolutions #read input on same line submit output # Open the input and output files. inputFile = open("filenamein2.txt", "r") outputFile = open("filenameout2.txt", "w") # Read the input on the first line (two entries) myInput = inputFile.readline().split() x = int(myInput[0]) y = int(myInput[1]) # Read the input on the second line (one entry) myInput = inputFile.readline() z = int(myInput) # Calculations add = x+y+z multiply = x*y*z # Write the answer to the output file (two outputs with space in between) outputFile.write(str(add)+' '+str(multiply)) # Finally, close the input/output files. inputFile.close() outputFile.close()