#include <bits/stdc++.h>
using namespace std;
struct Point {
  double x, y;
  Point() {}
  Point(double x, double y) : x(x), y(y) {}
  Point(const Point& p) : x(p.x), y(p.y) {}
  Point operator+(const Point& p) const { return Point(x + p.x, y + p.y); }
  Point operator-(const Point& p) const { return Point(x - p.x, y - p.y); }
  Point operator*(double c) const { return Point(x * c, y * c); }
  Point operator/(double c) const { return Point(x / c, y / c); }
  bool operator<(const Point& p) const {
    if (x == p.x) {
      return y < p.y;
    }
    return x < p.x;
  }
  bool operator==(const Point& p) const { return (x == p.x) && (y == p.y); }
};
double Cross(const Point& A, const Point& B) { return A.x * B.y - A.y * B.x; }
double Dot(const Point& A, const Point& B) { return A.x * B.x + A.y * B.y; }
vector<Point> ConvexHull(vector<Point> p) {
  sort(p.begin(), p.end());
  p.erase(unique(p.begin(), p.end()), p.end());
  int n = p.size();
  int m = 0;
  vector<Point> ch(n + 1);
  for (int i = 0; i < n; i++) {
    while (m > 1 && Cross(ch[m - 1] - ch[m - 2], p[i] - ch[m - 2]) <= 0) m--;
    ch[m++] = p[i];
  }
  int k = m;
  for (int i = n - 2; i >= 0; i--) {
    while (m > k && Cross(ch[m - 1] - ch[m - 2], p[i] - ch[m - 2]) <= 0) m--;
    ch[m++] = p[i];
  }
  if (n > 1) m--;
  ch.resize(m);
  return ch;
}
const double eps = 1e-10;
int dcmp(double x) {
  if (fabs(x) < eps)
    return 0;
  else
    return x < 0 ? -1 : 1;
}
bool OnSegment(const Point& p, const Point& a1, const Point& a2) {
  return dcmp(Cross(a1 - p, a2 - p)) == 0 && dcmp(Dot(a1 - p, a2 - p)) < 0;
}
int IsPointInPolygon(const Point& p, const vector<Point>& poly) {
  int wn = 0;
  int n = poly.size();
  for (int i = 0; i < n; i++) {
    const Point& p1 = poly[i];
    const Point& p2 = poly[(i + 1) % n];
    if (p1 == p || p2 == p || OnSegment(p, p1, p2)) return -1;
    int k = dcmp(Cross(p2 - p1, p - p1));
    int d1 = dcmp(p1.y - p.y);
    int d2 = dcmp(p2.y - p.y);
    if (k > 0 && d1 <= 0 && d2 > 0) wn++;
    if (k < 0 && d2 <= 0 && d1 > 0) wn--;
  }
  if (wn != 0) return 1;
  return 0;
}
vector<Point> Mx, Mn;
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  int a, b;
  scanf("%d%d", &(a), &(b));
  for (int i = (0); i < (n); ++i) {
    scanf("%d%d", &(a), &(b));
    Mx.push_back(Point(a, b));
  }
  int MA = 0, MB = 0;
  for (int i = (0); i < (m); ++i) {
    scanf("%d%d", &(a), &(b));
    Mn.push_back(Point(a, b));
    MA = max(MA, a);
    MB = max(MB, b);
  }
  Mn.push_back(Point(MA, 0));
  Mn.push_back(Point(0, MB));
  Mn.push_back(Point(0, 0));
  Mn = ConvexHull(Mn);
  int notsame = 0;
  sort((Mx).begin(), (Mx).end());
  int mi = Mn.size() - 1;
  if (Mx[n - 1].x >= MA)
    notsame = 1;
  else
    for (int i = (0); i < (n); ++i) {
      if (i < n && Mx[i].x == Mx[i + 1].x) continue;
      while (mi > 1 && Mx[i].x > Mn[mi - 1].x) mi--;
      if ((long long)Mn[mi].y * (Mn[mi - 1].x - Mx[i].x) +
              (long long)Mn[mi - 1].y * (Mx[i].x - Mn[mi].x) <=
          (long long)Mx[i].y * (Mn[mi - 1].x - Mn[mi].x)) {
        notsame = 1;
        break;
      }
    }
  if (notsame)
    puts("Max");
  else
    puts("Min");
  return 0;
}
