#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > Max, Min;
vector<pair<int, int> > ch;
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  int x, y;
  scanf("%d%d", &x, &y);
  int maxx1 = 0, maxy1 = 0;
  for (int i = (0); i < int(n); ++i) {
    int a, b;
    scanf("%d%d", &a, &b);
    maxx1 = max(maxx1, a);
    maxy1 = max(maxy1, b);
    Max.push_back(make_pair(a, -b));
  }
  int maxx = 0, maxy = 0;
  for (int i = (0); i < int(m); ++i) {
    int a, b;
    scanf("%d%d", &a, &b);
    maxx = max(maxx, a);
    maxy = max(maxy, b);
    Min.push_back(make_pair(a, -b));
  }
  if (maxx1 >= maxx || maxy1 >= maxy) {
    puts("Max");
    return 0;
  }
  Min.push_back(make_pair(maxx, 0));
  Min.push_back(make_pair(0, -maxy));
  sort(Min.begin(), Min.end());
  ch.push_back(make_pair(Min[0].first, -Min[0].second));
  ch.push_back(make_pair(Min[1].first, -Min[1].second));
  for (int i = (2); i < int(Min.size()); ++i) {
    while (ch.size() > 1) {
      pair<int, int> p1 = ch[ch.size() - 2];
      pair<int, int> p2 = ch[ch.size() - 1];
      long long dx1 = p2.first - p1.first;
      long long dy1 = p2.second - p1.second;
      long long dx2 = Min[i].first - p1.first;
      long long dy2 = -Min[i].second - p1.second;
      if (dx1 * dy2 - dy1 * dx2 >= 0)
        ch.pop_back();
      else
        break;
    }
    ch.push_back(make_pair(Min[i].first, -Min[i].second));
  }
  sort(Max.begin(), Max.end());
  int pos = 0;
  for (int i = (0); i < int(Max.size()); ++i) {
    while (ch[pos].first <= Max[i].first) ++pos;
    pair<int, int> p1 = ch[pos - 1];
    pair<int, int> p2 = ch[pos];
    long long dx1 = p2.first - p1.first;
    long long dy1 = p2.second - p1.second;
    long long dx2 = Max[i].first - p1.first;
    long long dy2 = -Max[i].second - p1.second;
    if (dx1 * dy2 - dy1 * dx2 >= 0) {
      puts("Max");
      return 0;
    }
  }
  puts("Min");
}
