#include <bits/stdc++.h>
using namespace std;
int a[55][55], b[55][55];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i <= n; i++) {
    for (int j = 0; j <= m; j++) {
      if (i && j)
        scanf("%d", &a[i][j]);
      else
        a[i][j] = 0;
    }
  }
  for (int i = 0; i <= n; i++) {
    for (int j = 0; j <= m; j++) {
      if (i && j)
        scanf("%d", &b[i][j]);
      else
        a[i][j] = 0;
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (a[i][j] > b[i][j]) {
        int p = a[i][j];
        a[i][j] = b[i][j];
        b[i][j] = p;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (a[i][j] <= a[i - 1][j] || a[i][j] <= a[i][j - 1]) {
        puts("Impossible");
        return 0;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= m; j++) {
      if (b[i][j] <= b[i - 1][j] || b[i][j] <= b[i][j - 1]) {
        puts("Impossible");
        return 0;
      }
    }
  }
  puts("Possible");
  return 0;
}
