#include <iostream>
using namespace std;
int v[21][21];
int main()
{
int n, m, i, j, suma=0, produs=1;
cout << " n= "; cin >> n;
cout << " m= "; cin >> m;
cout << " introdu " << n*m << " numere intregi \n";
for (i=1; i<=n; ++i)
{
for (j=1; j<=m; ++j)
{
cin >> v[i][j];
if (i%2==0) suma=suma+v[i][j];
if (i%2==1 && v[i][j]>0) produs=produs*v[i][j];
}
}
cout << " suma= " << suma << "\n";
cout << " produs= " << produs;
return 0;
}