import sys

zh = open(sys.argv[1],'r',encoding="utf-8")
en = open(sys.argv[2],'r',encoding="utf-8")

count = -1
bundary = 400 
zh_list = []
en_list = []
for i in range(8):
    zh_list.append(open('data_zh%d'%i,'w',encoding="utf-8"))
    en_list.append(open('data_en%d' % i, 'w', encoding="utf-8"))
for line_zh, line_en in zip(zh.readlines(),en.readlines()):
    line_zh = line_zh.strip().replace('\n','')
    line_en = line_en.strip().replace('\n','')
    count+=1
    index = int(count / bundary)
    zh_list[index].write(line_zh+'\n')
    en_list[index].write(line_en+'\n')
    if count%50000 == 0:
        print("\t\tprocess ->%d\r" % count,end='')
