#include <bits/stdc++.h>
#include "artclass.h"
using namespace std;
#define double long double
int style(int H, int W, int R[500][500], int G[500][500], int B[500][500]) {
double totA = 0, totB = 0, totC = 0;
for(int i = 0; i < H; i++){
for(int j = 0; j < W; j++){
totA+=R[i][j];
totB+=G[i][j];
totC+=B[i][j];
}
}
if(totA/totC > (double)2.0 || totB/totC > (double)2.0){
return 4;
}
return 2;
}
/*
signed main(){
ios::sync_with_stdio(false);
cin.tie(0);
int H, W;
cin >> H >> W;
double R[H][W];
double G[H][W];
double B[H][W];
double totA = 0, totB = 0, totC = 0;
for(int i = 0; i < H; i++){
for(int j = 0; j < W; j++){
cin >> R[i][j] >> G[i][j] >> B[i][j];
totA+=R[i][j];
totB+=G[i][j];
totC+=B[i][j];
}
}
cout << totA/totC << ' ' << totB/totC << ' ' << totC/totC << endl;
}*/