#include <bits/stdc++.h>
using namespace std;
const long double pi = acos(-1);
const long long inf = 1LL << 30;
const double eps = 1e-9;
const long long mod = 1e9 + 7;
const int N = 0;
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  int x1 = 1, x2 = n;
  while (x2 >= x1) {
    int y1 = 1, y2 = m;
    while (y2 >= 1) {
      if (x1 == x2 && y1 > y2) break;
      printf("%d %d\n", x1, y1);
      if (x1 == x2 && y1 == y2) break;
      printf("%d %d\n", x2, y2);
      y1++;
      y2--;
    }
    x1++;
    x2--;
  }
}
