#include <bits/stdc++.h>
using namespace std;
const long long INF = (long long)1 << 62;
const long long MOD = 1e9 + 7;
const double PI = 3.14159265359;
int main() {
  int n, m;
  cin >> n >> m;
  for (int col = 1; col <= m / 2; col++) {
    for (int row = 1; row <= n; row++) {
      cout << row << " " << col << "\n";
      cout << n - row + 1 << " " << m - col + 1 << "\n";
    }
  }
  if (m % 2) {
    for (int row = 1; row <= n / 2; row++) {
      cout << row << " " << m / 2 + 1 << "\n";
      cout << n - row + 1 << " " << m / 2 + 1 << "\n";
    }
    if (n % 2) cout << n / 2 + 1 << " " << m / 2 + 1 << "\n";
  }
  return 0;
}
