#include <bits/stdc++.h>
using namespace std;
struct Point {
  long long x, y;
  int tp;
  Point() : x(0), y(0), tp(0) {}
  Point(long long _x, long long _y) : x(_x), y(_y), tp(0) {}
  Point(long long _x, long long _y, int _t) : x(_x), y(_y), tp(_t) {}
  bool operator<(const Point &b) const { return tie(x, y) < tie(b.x, b.y); }
  bool operator==(const Point &b) const { return tie(x, y) == tie(b.x, b.y); }
  Point operator+(const Point &b) const { return Point(x + b.x, y + b.y); }
  Point operator-(const Point &b) const { return Point(x - b.x, y - b.y); }
  long long operator*(const Point &b) const { return x * b.x + y * b.y; }
  long long operator%(const Point &b) const { return x * b.y - y * b.x; }
  Point operator*(const long long &b) const { return Point(x * b, y * b); }
  long long abs() { return sqrt(abs2()); }
  long long abs2() { return x * x + y * y; }
};
long long cross(Point o, Point a, Point b) { return (a - o) % (b - o); }
vector<Point> convex_hull(vector<Point> pt) {
  sort(pt.begin(), pt.end());
  int top = 0;
  vector<Point> stk(2 * pt.size());
  for (int i = 0; i < (int)pt.size(); i++) {
    while (top >= 2 && cross(stk[top - 2], stk[top - 1], pt[i]) < 0) top--;
    stk[top++] = pt[i];
  }
  for (int i = pt.size() - 2, t = top + 1; i >= 0; i--) {
    while (top >= t && cross(stk[top - 2], stk[top - 1], pt[i]) < 0) top--;
    stk[top++] = pt[i];
  }
  stk.resize(top - 1);
  return stk;
}
int N, M;
Point initPt;
int main() {
  ios_base::sync_with_stdio(0);
  cin >> N >> M;
  cin >> initPt.x >> initPt.y;
  vector<Point> pt;
  for (int i = 0; i < N; i++) {
    long long x, y;
    cin >> x >> y;
    pt.push_back(Point(x, y, 1));
  }
  for (int i = 0; i < M; i++) {
    long long x, y;
    cin >> x >> y;
    pt.push_back(Point(x, y, 2));
    pt.push_back(Point(x, 0, 2));
    pt.push_back(Point(0, y, 2));
  }
  pt.push_back(Point(0, 0));
  sort(pt.begin(), pt.end());
  int rN = 1;
  for (int i = 1; i < (int)pt.size(); i++) {
    if (pt[i].x == pt[rN - 1].x && pt[i].y == pt[rN - 1].y) {
      if (pt[i].tp == 1) pt[rN - 1].tp = 1;
    } else {
      pt[rN++] = pt[i];
    }
  }
  pt.resize(rN);
  pt = convex_hull(pt);
  int fail = 0;
  for (auto it : pt) {
    if (it.tp == 1) fail = 1;
  }
  cout << (fail ? "Max" : "Min") << endl;
  return 0;
}
