Case #1: 6 Case #2: -1 Case #3: 24 Case #4: -1 Case #5: 424179 Case #6: -1 Case #7: 1000000000 Case #8: -1 Case #9: 33920 Case #10: -1 Case #11: 322 Case #12: -1