Caleb is putting beads on a string. He plans on starting with \(8\) round beads, followed by \(24\) square beads, then \(48\) round beads, and then \(p\) square beads, where \(p\geq 0\).
Once he has placed \(n\) beads on the string, where \(n>0\), the number of beads of one shape is exactly twice the number of beads of the other shape.
Determine the maximum and minimum values of \(p\) that result in exactly \(5\) possible values of \(n\).