#include <iostream>
using namespace std;
int main()
{
int a[20][30],m,n,i,j;
cout<<"m="; cin>>m;
cout<<"n="; cin>>n;
for(i=0;i<m;i++)
for(j=0;j<n;j++)
{ cout<<"a["<<i<<"]["<<j<<"]=";
cin>>a[i][j];
}
cout<<"Elementele divizibile cu 2:";
for(i=0;i<m;i++)
for(j=0;j<n;j++)
if(a[i][j]%2==0)
cout<<a[i][j]<<",";
}