#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 9;
const int MOD = 1e9 + 7;
int R, n, m;
pair<int, int> head[205], tail[205];
int dis[205][205];
int dp[205][205];
int mark[205][205];
bool cycle;
queue<pair<int, int> > q;
int dfs(pair<int, int> v) {
  int vh = v.first;
  int vt = v.second;
  if (vh + vt > R) return 0;
  if (mark[vh][vt] == 2) return dp[vh][vt];
  mark[vh][vt] = 1;
  for (int i = 1; i <= min(n, vh); i++) {
    int ph, pt;
    ph = vh - i + head[i].first;
    pt = vt + head[i].second;
    if (mark[ph][pt] == 1) {
      cycle = true;
      continue;
    }
    dp[vh][vt] = max(dp[vh][vt], dfs({ph, pt}) + 1);
  }
  for (int i = 1; i <= min(m, vt); i++) {
    int ph, pt;
    ph = vh + tail[i].first;
    pt = vt - i + tail[i].second;
    if (mark[ph][pt] == 1) {
      cycle = true;
      continue;
    }
    dp[vh][vt] = max(dp[vh][vt], dfs({ph, pt}) + 1);
  }
  mark[vh][vt] = 2;
  return dp[vh][vt];
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  memset(dis, -1, sizeof(dis));
  int h, t;
  cin >> h >> t >> R;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> head[i].first >> head[i].second;
  cin >> m;
  for (int i = 1; i <= m; i++) cin >> tail[i].first >> tail[i].second;
  q.push({h, t});
  dis[h][t] = 0;
  while (!q.empty()) {
    int ch = q.front().first, ct = q.front().second;
    q.pop();
    int cd = dis[ch][ct];
    for (int i = 1; i <= min(n, ch); i++) {
      int ph, pt;
      ph = ch - i + head[i].first;
      pt = ct + head[i].second;
      if (ph + pt <= R && dis[ph][pt] == -1) {
        dis[ph][pt] = cd + 1;
        q.push({ph, pt});
      }
    }
    for (int i = 1; i <= min(m, ct); i++) {
      int ph, pt;
      ph = ch + tail[i].first;
      pt = ct - i + tail[i].second;
      if (ph + pt <= R && dis[ph][pt] == -1) {
        dis[ph][pt] = cd + 1;
        q.push({ph, pt});
      }
    }
  }
  if (dis[0][0] != -1) return cout << "Ivan\n" << dis[0][0] << "\n", 0;
  dfs({h, t});
  if (cycle) return cout << "Draw\n", 0;
  cout << "Zmey\n" << dp[h][t] << "\n";
}
