#include using namespace std;; int main(){ long long int A,B,C,P,Q,R,N,M; cin >> A >> B >> C >> P >> Q >> R; N=C*(P+Q+R); M=N-C+1; cout << M << " " << N << endl; }