#include <fstream>
#include <string>
#include <iostream>
using namespace std;
int main() {
string word, s1, s2;
int i = 0;
ifstream fin("infile.txt", ios::in);
if (!fin) { cout << "Error open file." << endl; return 1; };
while (!fin.eof()) {
i++;
fin >> word;
(word.size() % 2 == 0) ? s1 += word += ' ' : s2 += word += ' ';
}
s1 += s2;
cout << "Всего слов: " << i << endl;
cout << s1 << endl;
cin.get();
return 0;
};