#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
const long long N = 3 * 2e2 + 7;
bool mark[N][N], mark2[N][N];
pair<long long, long long> hi[N], ti[N];
queue<pair<pair<long long, long long>, long long> > q;
long long dis[N][N], R, n, m;
inline void dfs(long long h, long long t) {
  mark[h][t] = 0;
  if (h + t > R) return;
  mark2[h][t] = 1;
  for (long long i = 1; i <= n && i <= h; i++) {
    long long x = h - i + hi[i].first, y = t + hi[i].second;
    if (mark2[x][y]) {
      cout << "Draw" << endl;
      exit(0);
    }
    if (mark[x][y]) dfs(x, y);
    dis[h][t] = max(dis[h][t], dis[x][y] + 1);
  }
  for (long long i = 1; i <= m && i <= t; i++) {
    long long x = h + ti[i].first, y = t - i + ti[i].second;
    if (mark2[x][y]) {
      cout << "Draw" << endl;
      exit(0);
    }
    if (mark[x][y]) dfs(x, y);
    dis[h][t] = max(dis[h][t], dis[x][y] + 1);
  }
  mark2[h][t] = 0;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long h, H, t, T, i, j, x, y, l;
  bool draw = 0;
  cin >> H >> T >> R;
  mark[H][T] = 1;
  q.push({{H, T}, 0});
  cin >> n;
  for (i = 1; i <= n; i++) cin >> hi[i].first >> hi[i].second;
  cin >> m;
  for (i = 1; i <= m; i++) cin >> ti[i].first >> ti[i].second;
  while (!q.empty()) {
    h = q.front().first.first, t = q.front().first.second, l = q.front().second;
    q.pop();
    if (!h && !t) return cout << "Ivan\n" << l << endl, 0;
    for (i = 1; i <= h && i <= n; i++) {
      x = h - i + hi[i].first;
      y = t + hi[i].second;
      if (x + y <= R && !mark[x][y]) q.push({{x, y}, l + 1}), mark[x][y] = 1;
    }
    for (i = 1; i <= t && i <= m; i++) {
      x = h + ti[i].first;
      y = t - i + ti[i].second;
      if (x + y <= R && !mark[x][y]) q.push({{x, y}, l + 1}), mark[x][y] = 1;
    }
  }
  dfs(H, T);
  cout << "Zmey\n" << dis[H][T] << endl;
  cerr << "\nTime elapsed: " << 1000 * clock() / CLOCKS_PER_SEC << "ms\n";
  return 0;
}
