#include <iostream>
using namespace std;
bool isThreeDigitProduct(int matrix[100][100], int n, int m) {
int product = 1;
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
product *= matrix[j];
}
}
return product >= 100 && product <= 999;
}
int main() {
int n, m;
cin >> n >> m;
int matrix[100][100];
for (int i = 0; i < n; i++) {
for (int j = 0; j < m; j++) {
cin >> matrix[j];
}
}
if (isThreeDigitProduct(matrix, n, m)) {
cout << "yes";
}
else {
cout << "no";
}
return 0;
}