#include <iostream>
using namespace std;
int main() {
int mat[10][10];
int n, m;
//Citire matrice
cin >> n >> m;
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++)
cin >> mat[i][j];
}
//Determinare minim
int minim = 2147483647;
int nr_ap = 0;
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
if (mat[i][j] < minim) {
minim = mat[i][j];
nr_ap = 1;
}
else if (mat[i][j] == minim) nr_ap++;
}
}
if (nr_ap) cout << "Minim : " << minim << "\nNr aparitii : " << nr_ap << "\nPozitii aparitii : ";
//Afisate pozitii minim
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++)
if (minim == mat[i][j]) cout << "(" << i << "," << j << ") ";
}
}