#!/usr/local/bin/perl
#Find all positive integer solutions under 1000
# such that a ** 3 + b^3 = c^3 + d^3
#
# i=1000
# for all a 
# for all b
# for all c
# for all d
# do
#  if a<i and b<i and c<i and d<i
#  spit_up if a ** 3 + b^3 = c^3 + d^3
# done
#
#
 
my $max = 1000;
my $a = 0;
my $b = 0;
my $c = 0;
my $d = 0;

while ($a<1000, $b<1000, $c<1000, $d<1000) {
	spit_up if (($a ** 3 + $b ** 3) == ( $c ** 3 + $d ** 3 ));
  printf STDERR ("a: %d  b: %d  c: %d  d: %d\n", $a, $b, $c, $d);
  $a++;
  $b++;
  $c++;
  $d++;
}

