private void gauss(int[][] a, int[] b) {
		int y = a.length;
		int x = a[0].length;
		int column = -1;

		loop: for (int i = 0; i < y; i++) {
			// Find pivot row
			int max = i;
			do {
				if (++column == x) break loop;
				for (int j = i + 1; j < y; j++) {
					if (a[j][column] != 0) {
						max = j;
					}
				}
			} while (a[max][column] == 0);

			// Swap rows
			int[] temp = a[i];
			a[i] = a[max];
			a[max] = temp;

			int t = b[i];
			b[i] = b[max];
			b[max] = t;

			// Subtraction by rows
			for (int j = i + 1; j < y; j++) {
				if (a[j][column] != 0) {
					int alpha = a[j][column] / a[i][column];
					b[j] -= alpha * b[i];
					for (int k = i; k < x; k++) {
						a[j][k] -= alpha * a[i][k];
					}
				}
			}
		}
	}