#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const int MOD = 1000000007;
pair<int, int> head[202], tail[202];
int dist[202][202], c[202][202], dp[202][202], r;
vector<pair<int, int> > tab[202][202];
bool dfs(int x, int y) {
  if (x + y > r) return 0;
  c[x][y] = 1;
  for (auto it : tab[x][y]) {
    if (c[it.first][it.second] == 1) {
      return 1;
    }
    if (!c[it.first][it.second] && dfs(it.first, it.second)) return 1;
  }
  c[x][y] = 2;
  return 0;
}
int solve(int x, int y) {
  if (x + y > r) return 0;
  if (dp[x][y] != -1) return dp[x][y];
  int ans = 0;
  for (auto it : tab[x][y]) ans = max(ans, solve(it.first, it.second) + 1);
  return dp[x][y] = ans;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int h, t, n, m;
  cin >> h >> t >> r >> n;
  for (int i = 0; i < n; ++i) cin >> head[i].first >> head[i].second;
  cin >> m;
  for (int i = 0; i < m; ++i) cin >> tail[i].first >> tail[i].second;
  for (int i = 0; i <= 200; ++i) {
    for (int j = 0; j <= 200; ++j) {
      dp[i][j] = -1, dist[i][j] = 1000000000;
      for (int H = 0; H < n; ++H) {
        if ((H + 1) > i) break;
        int f = i - (H + 1) + head[H].first, s = j + head[H].second;
        if (f < 0 || f > 200 || s < 0 || s > 200) continue;
        tab[i][j].push_back(pair<int, int>(f, s));
      }
      for (int T = 0; T < m; ++T) {
        if ((T + 1) > j) break;
        int f = i + tail[T].first, s = j - (T + 1) + tail[T].second;
        if (f < 0 || f > 200 || s < 0 || s > 200) continue;
        tab[i][j].push_back(pair<int, int>(f, s));
      }
    }
  }
  queue<pair<int, int> > q;
  q.push(pair<int, int>(h, t));
  dist[h][t] = 0;
  while (!q.empty()) {
    pair<int, int> f = q.front();
    q.pop();
    if (!f.first && !f.second) {
      cout << "Ivan\n" << dist[f.first][f.second] << "\n";
      return 0;
    }
    for (auto it : tab[f.first][f.second])
      if (dist[it.first][it.second] == 1000000000 &&
          (it.first + it.second) <= r) {
        dist[it.first][it.second] = dist[f.first][f.second] + 1;
        q.push(it);
      }
  }
  if (dfs(h, t)) {
    cout << "Draw\n";
    return 0;
  }
  cout << "Zmey\n" << solve(h, t) << "\n";
  return 0;
}
