#include <bits/stdc++.h>
using namespace std;
void fast() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
}
int main() {
  fast();
  long long int t = 1;
  while (t--) {
    long long int n, m;
    cin >> n >> m;
    long long int a[n][m], b[n][m];
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        cin >> a[i][j];
      }
    }
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        cin >> b[i][j];
      }
    }
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        if (a[i][j] > b[i][j]) {
          a[i][j] = b[i][j] + a[i][j];
          b[i][j] = a[i][j] - b[i][j];
          a[i][j] = a[i][j] - b[i][j];
        }
      }
    }
    bool ans = 1;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m - 1; j++) {
        if (a[i][j] >= a[i][j + 1]) {
          ans = 0;
          break;
        }
        if (b[i][j] >= b[i][j + 1]) {
          ans = 0;
          break;
        }
      }
    }
    for (int i = 0; i < n - 1; i++) {
      for (int j = 0; j < m; j++) {
        if (a[i][j] >= a[i + 1][j]) {
          ans = 0;
          break;
        }
        if (b[i][j] >= b[i + 1][j]) {
          ans = 0;
          break;
        }
      }
    }
    if (!ans)
      cout << "Impossible";
    else
      cout << "Possible";
  }
}
