#include <bits/stdc++.h>
using namespace std;
void solve();
int main() {
  ios::sync_with_stdio(0);
  solve();
  return 0;
}
int R;
vector<pair<int, int> > head, tail;
int H[300][300];
int Dp(pair<int, int> u) {
  if (u.first + u.second > R) return 0;
  if (H[u.first][u.second] != -1) return H[u.first][u.second];
  int& r = H[u.first][u.second] = 0;
  int lim = min(u.first, (int)((head).size()));
  for (int i = 0; i < lim; i++) {
    pair<int, int> v(u.first - i - 1 + head[i].first,
                     u.second + head[i].second);
    r = max(r, Dp(v) + 1);
  }
  lim = min(u.second, (int)((tail).size()));
  for (int i = 0; i < lim; i++) {
    pair<int, int> v(u.first + tail[i].first,
                     u.second - i - 1 + tail[i].second);
    r = max(r, Dp(v) + 1);
  }
  return r;
}
void dfs(pair<int, int> u) {
  H[u.first][u.second] = 1;
  int lim = min(u.first, (int)((head).size()));
  for (int i = 0; i < lim; i++) {
    pair<int, int> v(u.first - i - 1 + head[i].first,
                     u.second + head[i].second);
    if (v.first + v.second > R) continue;
    if (H[v.first][v.second] == 1) {
      cout << "Draw\n";
      exit(0);
    }
    if (H[v.first][v.second] == 0) dfs(v);
  }
  lim = min(u.second, (int)((tail).size()));
  for (int i = 0; i < lim; i++) {
    pair<int, int> v(u.first + tail[i].first,
                     u.second - i - 1 + tail[i].second);
    if (v.first + v.second > R) continue;
    if (H[v.first][v.second] == 1) {
      cout << "Draw\n";
      exit(0);
    }
    if (H[v.first][v.second] == 0) dfs(v);
  }
  H[u.first][u.second] = 2;
}
void solve() {
  int h, t;
  cin >> h >> t >> R;
  int N;
  cin >> N;
  for (int i = 0; i < N; i++) {
    int a, b;
    cin >> a >> b;
    head.push_back(pair<int, int>(a, b));
  }
  int M;
  cin >> M;
  for (int i = 0; i < M; i++) {
    int a, b;
    cin >> a >> b;
    tail.push_back(pair<int, int>(a, b));
  }
  memset(H, -1, sizeof(H));
  H[h][t] = 0;
  deque<pair<int, int> > Q;
  Q.push_back(pair<int, int>(h, t));
  while (!Q.empty()) {
    pair<int, int> u = Q.front();
    Q.pop_front();
    int h = H[u.first][u.second] + 1;
    int lim = min(u.first, (int)((head).size()));
    for (int i = 0; i < lim; i++) {
      pair<int, int> v(u.first - i - 1 + head[i].first,
                       u.second + head[i].second);
      if (v.first + v.second > R) continue;
      if (H[v.first][v.second] == -1) {
        H[v.first][v.second] = h;
        Q.push_back(v);
      }
    }
    lim = min(u.second, (int)((tail).size()));
    for (int i = 0; i < lim; i++) {
      pair<int, int> v(u.first + tail[i].first,
                       u.second - i - 1 + tail[i].second);
      if (v.first + v.second > R) continue;
      if (H[v.first][v.second] == -1) {
        H[v.first][v.second] = h;
        Q.push_back(v);
      }
    }
  }
  if (H[0][0] != -1) {
    cout << "Ivan\n";
    cout << H[0][0] << '\n';
    return;
  }
  memset(H, 0, sizeof(H));
  dfs(make_pair(h, t));
  memset(H, -1, sizeof(H));
  cout << "Zmey\n";
  cout << Dp(make_pair(h, t)) << '\n';
}
