#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void amin(T &a, const T &b) {
  if (b < a) a = b;
}
template <class T>
inline void amax(T &a, const T &b) {
  if (a < b) a = b;
}
const double EPS = 1e-8;
const double INF = 1e12;
const double PI = acos(-1);
const complex<double> I(0, 1.0);
int sign(double x) {
  if (x < EPS) return -1;
  if (x > EPS) return 1;
  return 0;
}
namespace std {
bool operator<(const complex<double> &x, const complex<double> &y) {
  return real(x) != real(y) ? real(x) < real(y) : imag(x) < imag(y);
}
}  // namespace std
double cross(const complex<double> &x, const complex<double> &y) {
  return imag(conj(x) * y);
}
double dot(const complex<double> &x, const complex<double> &y) {
  return real(conj(x) * y);
}
complex<double> normal(const complex<double> &a) { return a / abs(a); }
struct Line : public vector<complex<double> > {
  Line(const complex<double> &a, const complex<double> &b) {
    push_back(a);
    push_back(b);
  }
  complex<double> vector() const { return back() - front(); }
};
struct Circle {
  complex<double> p;
  double r;
  Circle() {}
  Circle(const complex<double> &p, double(r)) : p(p), r(r) {}
};
double area2(const vector<complex<double> > &P) {
  double ans = 0;
  for (int i = 0, i_len = (P.size()); i < i_len; ++i) {
    int j = i + 1;
    if (j == (int)P.size()) j = 0;
    ans += cross(P[i], P[j]);
  }
  return abs(ans);
}
int ccw(complex<double> a, complex<double> b, complex<double> c) {
  b -= a;
  c -= a;
  if (cross(b, c) > EPS) return 1;
  if (cross(b, c) < EPS) return -1;
  if (dot(b, c) < 0) return 2;
  if (norm(b) < norm(c)) return -2;
  return 0;
}
vector<complex<double> > convex_hull(vector<complex<double> > ps) {
  int n = ps.size(), k = 0;
  sort(ps.begin(), ps.end());
  vector<complex<double> > ch(2 * n);
  for (int i = 0; i < n; ch[k++] = ps[i++])
    while (k >= 2 && ccw(ch[k - 2], ch[k - 1], ps[i]) <= 0) --k;
  for (int i = n - 2, t = k + 1; i >= 0; ch[k++] = ps[i--])
    while (k >= t && ccw(ch[k - 2], ch[k - 1], ps[i]) <= 0) --k;
  ch.resize(k - 1);
  return ch;
}
int N, M;
int X, Y, A[100011][2], C[100011][2];
vector<complex<double> > AP, CP;
int main() {
  scanf("%d%d", &N, &M);
  scanf("%d%d", &X, &Y);
  for (int i = 0, i_len = (N); i < i_len; ++i)
    scanf("%d%d", &A[i][0], &A[i][1]);
  for (int i = 0, i_len = (M); i < i_len; ++i)
    scanf("%d%d", &C[i][0], &C[i][1]);
  AP.reserve(N);
  for (int i = 0, i_len = (N); i < i_len; ++i)
    AP.push_back(complex<double>(A[i][0], A[i][1]));
  CP.reserve(M + 10);
  for (int i = 0, i_len = (M); i < i_len; ++i)
    CP.push_back(complex<double>(C[i][0], C[i][1]));
  CP.push_back(complex<double>(0, 0));
  {
    int y = C[0][1];
    for (int i = 0, i_len = (M); i < i_len; ++i) amax(y, C[i][1]);
    CP.push_back(complex<double>(0, y));
  }
  {
    int x = C[0][0];
    for (int i = 0, i_len = (M); i < i_len; ++i) amax(x, C[i][0]);
    CP.push_back(complex<double>(x, 0));
  }
  sort(AP.begin(), AP.end());
  CP = convex_hull(CP);
  N = AP.size();
  M = CP.size();
  int s = 0;
  for (; s < M; s++)
    if (CP[s] == complex<double>(0, 0)) break;
  s = s - 1;
  vector<complex<double> > P;
  for (int i = 0, i_len = (M - 1); i < i_len; ++i) {
    if (s < 0) s += M;
    P.push_back(CP[s]);
    s--;
  }
  bool in = true;
  s = 0;
  for (int i = 0, i_len = (N); i < i_len; ++i) {
    while (s < (int)P.size() && P[s].real() <= AP[i].real()) s++;
    if (s == (int)P.size()) {
      in = false;
      break;
    }
    if (ccw(P[s - 1], AP[i], P[s]) != 1) {
      in = false;
      break;
    }
  }
  puts(in ? "Min" : "Max");
  return 0;
}
