AP PROBLEM PULLEY AND THREE MASSES

Three blocks of masses 1.0, 2.0 and 4.0 kilograms are connected by massless strings, one of which passes over a frictionless pulley of negligible mass, as shown. Calculate each of the following.
A) The acceleration of the 4-kilogram block
B) The tension in the string supporting the 4-kilogram block
C) The tension in the string connected to the 1-kilogram block