#include<bits/stdc++.h>
using namespace std;
struct NhanVien{
string mnv,hvt;
float hsl,lcb,pc;
};
NhanVien nv;
void NhapNv() {
ofstream os("nhanvien.txt");
for(int i = 1; i <= 2; i++) {
getline(cin, nv.mnv);
getline(cin, nv.hvt);
cin >> nv.hsl >> nv.lcb >> nv.pc;
cin.ignore();
os << nv.mnv << "\n" << nv.hvt << "\n" << nv.hsl << "\n" << nv.lcb << "\n" << nv.pc << "\n";
}
os.close();
}
void DocNv() {
ifstream in("nhanvien.txt");
while(getline(in, nv.mnv)) {
getline(in, nv.hvt);
in >> nv.hsl >> nv.lcb >> nv.pc;
cout << nv.mnv << " " << nv.hvt << " " << nv.hsl * nv.lcb + nv.pc << endl;
in.ignore();
}
}
int main() {
NhapNv();
DocNv();
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKc3RydWN0IE5oYW5WaWVuewogICAgc3RyaW5nIG1udixodnQ7CiAgICBmbG9hdCBoc2wsbGNiLHBjOwp9OwpOaGFuVmllbiBudjsKdm9pZCBOaGFwTnYoKSB7CiAgICBvZnN0cmVhbSBvcygibmhhbnZpZW4udHh0Iik7CiAgICAgZm9yKGludCBpID0gMTsgaSA8PSAyOyBpKyspICB7CiAgICAgICAgZ2V0bGluZShjaW4sIG52Lm1udik7CiAgICAgICAgZ2V0bGluZShjaW4sIG52Lmh2dCk7CiAgICAgICAgY2luID4+IG52LmhzbCA+PiBudi5sY2IgPj4gbnYucGM7CiAgICAgICAgIGNpbi5pZ25vcmUoKTsKICAgICAgICBvcyA8PCBudi5tbnYgPDwgIlxuIiA8PCBudi5odnQgPDwgIlxuIiA8PCBudi5oc2wgPDwgIlxuIiA8PCBudi5sY2IgPDwgIlxuIiA8PCBudi5wYyA8PCAiXG4iOwogICAgfQogICAgb3MuY2xvc2UoKTsKfQp2b2lkIERvY052KCkgewogICAgICBpZnN0cmVhbSBpbigibmhhbnZpZW4udHh0Iik7CiAgICB3aGlsZShnZXRsaW5lKGluLCBudi5tbnYpKSAgewogICAgICAgIGdldGxpbmUoaW4sIG52Lmh2dCk7CiAgICAgICAgaW4gPj4gbnYuaHNsID4+IG52LmxjYiA+PiBudi5wYzsKICAgICAgICBjb3V0IDw8IG52Lm1udiA8PCAiICIgPDwgbnYuaHZ0IDw8ICIgIiA8PCBudi5oc2wgKiBudi5sY2IgKyBudi5wYyA8PCBlbmRsOwogICAgICAgIGluLmlnbm9yZSgpOwogICAgfQp9CmludCBtYWluKCkgewogICAgTmhhcE52KCk7CiAgICBEb2NOdigpOwoKfQ==