# IMPORT all four classes
from ReadFile import ReadFile

readfile = ReadFile()

from Calculate import Calculate

calculate = Calculate()

from WriteFile import WriteFile

writefile = WriteFile()

# MAIN PROGRAM---------------------------------------------------------------------------------------------------------*

# Read the input data name from keyboard and returns the file name
inputDatafileName = readfile.readInputFile()

# Calculated the row amount of the file
rowAmount = readfile.howManyLinesAreInTheInputFile(inputDatafileName)

# Prepares input data to file transforms it to array
xAndYconstraint = readfile.prepareDataForCalculation(inputDatafileName,
                                                     rowAmount)

resultDeposit = calculate.findTheMultiples(xAndYconstraint)

# Sort data and write results into file
writefile.writeDataIntoFile(resultDeposit)