#!/usr/bin/env python3

def time_to_kill(h, d, r):
  hits = (h + d - 1) // d
  return r * (hits - 1)

h1,d1,r1 = map(int, input().split())
h2,d2,r2 = map(int, input().split())

ttk1 = time_to_kill(h1, d2, r2)
ttk2 = time_to_kill(h2, d1, r1)

if ttk2 < ttk1:
  print('player one')
elif ttk1 < ttk2:
  print('player two')
else:
  print('draw')
