sore_throat(ali). sore_throat(reza). temp(ali,38). temp(reza,37). duration(ali,2). strep_throat(X):-sore_throat(X), infection(X). fever(X):-temp(X,N),N>37. infection(X):-duration(X,N),N>1, fever(X).