title: Prolog: Finding all 3x3 magic squares without using clp(FD)
body: <p>I want to find all possible 3x3 magic squares.</p>
  
  <p>Quoting from <a href="https://en.wikipedia.org/wiki/Magic_square" rel="nofollow">English wikipedia</a>:</p>
  
  <blockquote>
    <p>A magic square is an arrangement of distinct numbers (i.e. each number is used once), usually integers, in a square grid, where the numbers in each row, and in each column, and the numbers in the main and secondary diagonals, all add up to the same number.</p>
  </blockquote>
  
  <p>Here's <em>one</em> sample solution:</p>
  
  <blockquote>
    <p>8 1 6<br>
    3 5 7<br>
    4 9 2</p>
  </blockquote>
  
  <p>How can I write a Prolog program that finds <em>all</em> solutions without using <code>library(clpfd)</code>?</p>