#include <bits/stdc++.h>
using namespace std;
int main() {
  unsigned long long n, t;
  cin >> n >> t;
  if (n == 1 && t == 10)
    cout << -1;
  else if (t == 2 || t == 4 || t == 8) {
    for (int i = 1; i <= n; i++) {
      cout << 8;
    }
  } else if (t == 3 || t == 9) {
    for (int i = 1; i <= n; i++) {
      cout << 9;
    }
  } else if (t == 5) {
    for (int i = 1; i <= n; i++) {
      cout << 5;
    }
  } else if (t == 7) {
    for (int i = 1; i <= n; i++) {
      cout << 7;
    }
  } else if (t == 6) {
    for (int i = 1; i <= n; i++) {
      cout << 6;
    }
  } else if (t == 10) {
    cout << 1;
    for (int i = 2; i <= n; i++) {
      cout << 0;
    }
  }
  return 0;
}
