.DEMO1

Answer for demo1

.DEMO2

Answer for demo2