book_title = input("Enter the book title: ")

while True:
    try:
        total_pages = int(input("Enter total pages: "))
        if total_pages <= 0:
            print("Total pages must be greater than zero.")
            continue
        break
    except ValueError:
        print("Please enter a valid number.")
    

while True:
    try:
        completed_pages = int(input("Enter pages completed: "))
        if completed_pages < 0 or completed_pages > total_pages:
            print("Please enter pages between 0 and", total_pages)
            continue
        break
    except ValueError:
        print("Please enter a valid number.")

remaining_pages = total_pages - completed_pages
progress = (completed_pages / total_pages) * 100
print("Book title:", book_title)
print("Pages remaining:", remaining_pages)
print("Reading progress:", round(progress, 1), "%")
print("Reading session completed successfully!")